MappingImage.Controls 2.1.1

dotnet add package MappingImage.Controls --version 2.1.1
                    
NuGet\Install-Package MappingImage.Controls -Version 2.1.1
                    
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="MappingImage.Controls" Version="2.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MappingImage.Controls" Version="2.1.1" />
                    
Directory.Packages.props
<PackageReference Include="MappingImage.Controls" />
                    
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 MappingImage.Controls --version 2.1.1
                    
#r "nuget: MappingImage.Controls, 2.1.1"
                    
#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 MappingImage.Controls@2.1.1
                    
#: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=MappingImage.Controls&version=2.1.1
                    
Install as a Cake Addin
#tool nuget:?package=MappingImage.Controls&version=2.1.1
                    
Install as a Cake Tool

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

  1. Install the package MappingImage.Controls (example):

    dotnet add package MappingImage.Controls --version 2.1.0

  2. In your WPF project, reference the controls namespace in XAML:

    xmlns:mi="clr-namespace:MappingImage.Controls;assembly=MappingImage.Controls"

  3. 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:

    1. 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

    2. 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 Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
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
2.1.1 108 7/30/2026
2.1.0 101 7/30/2026

Prepare for nuget.org: stable release 2.1.0. See repository for changelog.