MappingImage.Controls
2.1.1
dotnet add package MappingImage.Controls --version 2.1.1
NuGet\Install-Package MappingImage.Controls -Version 2.1.1
<PackageReference Include="MappingImage.Controls" Version="2.1.1" />
<PackageVersion Include="MappingImage.Controls" Version="2.1.1" />
<PackageReference Include="MappingImage.Controls" />
paket add MappingImage.Controls --version 2.1.1
#r "nuget: MappingImage.Controls, 2.1.1"
#:package MappingImage.Controls@2.1.1
#addin nuget:?package=MappingImage.Controls&version=2.1.1
#tool nuget:?package=MappingImage.Controls&version=2.1.1
MappingImage.Controls
This package provides WPF controls and helpers extracted from the MappingImage sample project.
Included
- MappingControl user control
- Behaviors: CanvasInteractionBehavior, ImageClickBehavior
- Helpers: GridOverlay
- Converters: StringNullOrEmptyToVisibilityConverter
- Models: ToothRegion
- Image asset: Images/odontograma-permanentes.jpeg (embedded as a resource in the assembly)
Usage
Install the package MappingImage.Controls (example):
dotnet add package MappingImage.Controls --version 2.1.0
In your WPF project, reference the controls namespace in XAML:
xmlns:mi="clr-namespace:MappingImage.Controls;assembly=MappingImage.Controls"
Use the control in your Window or Page:
<mi:MappingControl />
Accessing the embedded image (pack URI)
The image is embedded in the MappingImage.Controls assembly as a Resource. Use the following pack URI in XAML:
<Image Source="pack://application:,,,/MappingImage.Controls;component/Images/odontograma-permanentes.jpeg" />
Or from code-behind:
var uri = new Uri("pack://application:,,,/MappingImage.Controls;component/Images/odontograma-permanentes.jpeg", UriKind.Absolute); var bmp = new System.Windows.Media.Imaging.BitmapImage(uri); myImage.Source = bmp;
Notes
- The package targets net10.0-windows and requires a Windows WPF host.
- The control and image are provided by the MappingImage.Controls assembly; no separate content files are required.
- If you prefer the image to be provided as content files (so consumers can copy the file into their project), contact the package author to change packaging behavior.
Visual verification
The repository includes a small consumer console app that launches a WPF Window hosting the MappingControl for quick verification (project: MappingImage.ConsumerConsole). To run it against the locally built package:
Build and pack the library (creates nupkgs/MappingImage.Controls.2.1.0.nupkg):
dotnet build MappingImage.Controls/MappingImage.Controls.csproj -c Release dotnet pack MappingImage.Controls/MappingImage.Controls.csproj -c Release -o nupkgs
Restore and run the console verifier (it will open a window hosting the control):
dotnet restore MappingImage.ConsumerConsole/MappingImage.ConsumerConsole.csproj --configfile NuGet.config dotnet run --project MappingImage.ConsumerConsole/MappingImage.ConsumerConsole.csproj -c Debug --configfile NuGet.config
The repository also contains a consumer WPF project (MappingImage.Consumer) which will open a SampleWindow on startup demonstrating the packaged control and the embedded image via pack URI. Run it similarly after restoring packages.
Note: In headless or CI environments a GUI window may not be visible; run these locally on Windows with a desktop session for interactive verification.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows7.0 is compatible. |
-
net10.0-windows7.0
- CommunityToolkit.Mvvm (>= 8.4.2)
- MahApps.Metro (>= 2.4.11)
- MahApps.Metro.IconPacks (>= 6.2.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Prepare for nuget.org: stable release 2.1.0. See repository for changelog.