MathConverter.Maui
2.2.0
See the version list below for details.
dotnet add package MathConverter.Maui --version 2.2.0
NuGet\Install-Package MathConverter.Maui -Version 2.2.0
<PackageReference Include="MathConverter.Maui" Version="2.2.0" />
paket add MathConverter.Maui --version 2.2.0
#r "nuget: MathConverter.Maui, 2.2.0"
// Install MathConverter.Maui as a Cake Addin #addin nuget:?package=MathConverter.Maui&version=2.2.0 // Install MathConverter.Maui as a Cake Tool #tool nuget:?package=MathConverter.Maui&version=2.2.0
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 | net6.0-android31.0 is compatible. net6.0-ios16.1 is compatible. net6.0-maccatalyst16.1 is compatible. net6.0-windows10.0.19041 is compatible. net7.0-android was computed. net7.0-android33.0 is compatible. net7.0-ios was computed. net7.0-ios16.1 is compatible. net7.0-maccatalyst was computed. net7.0-maccatalyst16.1 is compatible. net7.0-windows was computed. net7.0-windows10.0.19041 is compatible. net8.0-android was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-windows was computed. |
-
net6.0-android31.0
- No dependencies.
-
net6.0-ios16.1
-
net6.0-maccatalyst16.1
-
net6.0-windows10.0.19041
- No dependencies.
-
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.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.