Pmad.Milsymbol.AspNetCore 0.1.53

dotnet add package Pmad.Milsymbol.AspNetCore --version 0.1.53
                    
NuGet\Install-Package Pmad.Milsymbol.AspNetCore -Version 0.1.53
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pmad.Milsymbol.AspNetCore" Version="0.1.53" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pmad.Milsymbol.AspNetCore" Version="0.1.53" />
                    
Directory.Packages.props
<PackageReference Include="Pmad.Milsymbol.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Pmad.Milsymbol.AspNetCore --version 0.1.53
                    
#r "nuget: Pmad.Milsymbol.AspNetCore, 0.1.53"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Pmad.Milsymbol.AspNetCore@0.1.53
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Pmad.Milsymbol.AspNetCore&version=0.1.53
                    
Install as a Cake Addin
#tool nuget:?package=Pmad.Milsymbol.AspNetCore&version=0.1.53
                    
Install as a Cake Tool

Milsymbol for ASP.NET Core

Setup

In Program.cs, on the Mvc Builder, add the Milsymbol components.

builder.Services
    .AddControllersWithViews()
        .AddMilsymbolMvcComponents();

In Program.cs, on the ApplicationBuilder, add the Milsymbol static files middleware.

app.UseMilsymbolStaticFiles();

In _ViewImports.cshtml, add the Milsymbol tag helpers.

@addTagHelper *, Pmad.Milsymbol.AspNetCore

ORBAT Component <pmad-orbat />

Implement the IOrbatUnit interface, or use the provided class OrbatUnitViewModel, and in the model, add a property of type IOrbarUnit

public required IOrbatUnit RootUnit { get; set; }

In the view (.cshtml file), add the ORBAT component.

<pmad-orbat root-unit="@Model.RootUnit" />

To set a tooltip, or a link on each unit symbol, you can :

  • implement the interface IOrbatUnitViewModel on the model and provide Href and Title,
  • or use the provided class OrbatUnitTitleViewModel and set Href and Title
  • or set delegates on pmad-orbat tag
<pmad-orbat 
    root-unit="@Model.RootUnit"
    unit-title="@(u => ((YourOrbatUnit)u).Label)"
    unit-link-controller="Units" unit-link-action="Details" unit-link-route="@(u => new { id = ((YourOrbatUnit)u).UnitID })" />

Symbol Component <pmad-symbol-selector />

APP-6D symbol selector component.

This component requires Boostrap 4 or 5. Version of bootstrap is automatically detected. Anyway, you can force the version by setting the DesignSystem in AddMilsymbolMvcComponents.

builder.Services
    .AddControllersWithViews()
        .AddMilsymbolMvcComponents(DesignSystem.Boostrap5); // DesignSystem.Automatic by default

Basic usage with Symbol as string property in the model:

<pmad-symbol-selector asp-for="Symbol" />

Component has differents layouts:

  • layout="Default" (default): Only dropdown lists
  • layout="Extended": Standard identity and Dummy/HQ/TF are selected with buttons, other categories are selected with dropdown lists

Please note that this component will automaticly include choices.js and milsymbol.js.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.53 503 3/3/2025
0.1.50 230 2/25/2025
0.1.48 192 2/25/2025
0.1.46 205 2/25/2025
0.1.41 203 2/20/2025
0.1.38 213 2/15/2025
0.1.36 205 2/11/2025
0.1.14 220 1/2/2025