MvvmAIO.Markup.WPF
0.1.1
See the version list below for details.
dotnet add package MvvmAIO.Markup.WPF --version 0.1.1
NuGet\Install-Package MvvmAIO.Markup.WPF -Version 0.1.1
<PackageReference Include="MvvmAIO.Markup.WPF" Version="0.1.1" />
<PackageVersion Include="MvvmAIO.Markup.WPF" Version="0.1.1" />
<PackageReference Include="MvvmAIO.Markup.WPF" />
paket add MvvmAIO.Markup.WPF --version 0.1.1
#r "nuget: MvvmAIO.Markup.WPF, 0.1.1"
#:package MvvmAIO.Markup.WPF@0.1.1
#addin nuget:?package=MvvmAIO.Markup.WPF&version=0.1.1
#tool nuget:?package=MvvmAIO.Markup.WPF&version=0.1.1
MvvmAIO.Markup
XAML markup extensions for common CLR types (booleans, integers, Guid, DateTime, TimeSpan, decimal, double, enum, and more). The shared implementation ships in two NuGet packages: WPF and Avalonia.
Packages
| Package | Description |
|---|---|
MvvmAIO.Markup.WPF |
WPF (UseWPF), multi-targeted from .NET Framework 4.6.1 through .NET 10 (Windows). |
MvvmAIO.Markup.Avalonia |
Avalonia 12, .NET 8 / 10. |
Authors: MvvmAIO, Skymly, wys0610. License: MIT.
Installation
dotnet add package MvvmAIO.Markup.WPF
# or
dotnet add package MvvmAIO.Markup.Avalonia
Usage (WPF / Avalonia)
The library maps MvvmAIO.Markup into the default XAML namespace via XmlnsDefinition, so you can use the built-in x prefix with the type name of the extension (for example x:Int32, x:Boolean, x:Guid).
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Sample">
<Button Content="Demo"
CommandParameter="{x:Int32 42}"
ToolTip="{x:Boolean True}" />
</Window>
Shared (WPF + Avalonia): Boolean, numeric primitives, Char, Guid, DateTime, TimeSpan, String, Uri, CultureInfo, and Enum.
Nullable struct literals: for each struct extension above, a matching Nullable* type exists (e.g. NullableInt32). Use a parameterless markup extension for null ({x:NullableInt32}), or pass a value ({x:NullableInt32 42}).
WPF / Avalonia (platform types): Thickness, Point, Size, Rect, Vector, GridLength, CornerRadius — same x: syntax; implementations live in each platform assembly. Nullable platform variants follow the same rules ({x:NullableThickness}, {x:NullablePoint '1,2'}).
Values that contain commas (for example Point, Rect, pack:// URIs) must be passed as a single quoted constructor argument, e.g. {x:Point '10,20'}.
See Samples.WPF in this repository for more examples.
Building & packing
- Solution:
MvvmAIO.Markup.slnx - Pack both NuGet packages:
dotnet pack MvvmAIO.Markup.Pack/MvvmAIO.Markup.Pack.csproj -c Release - Nuke (CI parity):
dotnet run --project build/_build.csproj -- --target Ci --configuration Release
Repository
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net7.0-windows7.0 is compatible. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
| .NET Framework | net461 is compatible. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 is compatible. net481 is compatible. |
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETFramework 4.8.1
- No dependencies.
-
net10.0-windows7.0
- No dependencies.
-
net6.0-windows7.0
- No dependencies.
-
net7.0-windows7.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
-
net9.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.