MathConverter.Maui
2.2.1
dotnet add package MathConverter.Maui --version 2.2.1
NuGet\Install-Package MathConverter.Maui -Version 2.2.1
<PackageReference Include="MathConverter.Maui" Version="2.2.1" />
<PackageVersion Include="MathConverter.Maui" Version="2.2.1" />
<PackageReference Include="MathConverter.Maui" />
paket add MathConverter.Maui --version 2.2.1
#r "nuget: MathConverter.Maui, 2.2.1"
#:package MathConverter.Maui@2.2.1
#addin nuget:?package=MathConverter.Maui&version=2.2.1
#tool nuget:?package=MathConverter.Maui&version=2.2.1
What is MathConverter?
MathConverter allows you to do Math in XAML.
MathConverter is a powerful Binding converter that allows you to specify how to perform conversions directly in XAML, without needing to define a new IValueConverter in C# for every single conversion.
Getting Started:
It's as easy as 1-2-3.
1) Install the Nuget package.
2) Add a MathConverter resource.
<Application.Resources>
<math:MathConverter x:Key="Math" />
</Application.Resources>
The math namespace is defined as follows:
xmlns:math="http://hexinnovation.com/math"
3) Do Math. Now, you can use MathConverter on any Binding. Specify a ConverterParameter to specify the rules of the conversion.
<Border CornerRadius="{Binding ActualHeight, ConverterParameter=x/2, Converter={StaticResource Math}}" />
Or, for conversions with multiple bindings.
<Border CornerRadius="{math:Convert 'Min(x,y)/2', x={Binding ActualHeight}, y={Binding ActualWidth}}" />
See the GitHub repository for documentation and examples.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0-android33.0 is compatible. net7.0-ios16.1 is compatible. net7.0-maccatalyst16.1 is compatible. net7.0-windows10.0.19041 is compatible. net8.0-android was computed. net8.0-android34.0 is compatible. net8.0-ios was computed. net8.0-ios17.0 is compatible. net8.0-maccatalyst was computed. net8.0-maccatalyst17.0 is compatible. net8.0-windows was computed. net8.0-windows10.0.19041 is compatible. net9.0-android was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-windows was computed. net10.0-android was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-windows was computed. |
-
net7.0-android33.0
- No dependencies.
-
net7.0-ios16.1
- No dependencies.
-
net7.0-maccatalyst16.1
- No dependencies.
-
net7.0-windows10.0.19041
- No dependencies.
-
net8.0-android34.0
- Microsoft.Maui.Controls (>= 8.0.3)
-
net8.0-ios17.0
- Microsoft.Maui.Controls (>= 8.0.3)
-
net8.0-maccatalyst17.0
- Microsoft.Maui.Controls (>= 8.0.3)
-
net8.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 8.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.