Skip to content

Commit

Permalink
Add README.md file to nuget package
Browse files Browse the repository at this point in the history
  • Loading branch information
timothylcooke committed Jun 17, 2023
1 parent d9bdd10 commit 8e3193a
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Nuget README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[![Math Converter: A XAML Converter that does it all.](https://raw.githubusercontent.com/hexinnovation/MathConverter/main/ReadmeAssets/Banner.svg)](https://github.com/hexinnovation/MathConverter)

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.

```xaml
<Application.Resources>
<math:MathConverter x:Key="Math" />
</Application.Resources>
```

The `math` namespace is defined as follows<b>*</b>:

```xaml
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.

```xaml
<Border.CornerRadius>
<MultiBinding ConverterParameter="Min(x,y)/2" Converter="{StaticResource Math}">
<Binding Path="ActualHeight" />
<Binding Path="ActualWidth" />
</MultiBinding>
</Border.CornerRadius>
```

See [the GitHub repository](https://github.com/hexinnovation/MathConverter) for documentation and examples.
1 change: 1 addition & 0 deletions src/MathConverter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MathConverter.Demo.WPF", "D
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Readme", "Readme", "{7F4CC393-A1F5-4591-90E9-F299D83549D9}"
ProjectSection(SolutionItems) = preProject
..\Nuget README.md = ..\Nuget README.md
..\README.md = ..\README.md
EndProjectSection
EndProject
Expand Down
2 changes: 2 additions & 0 deletions src/Projects/Common/App.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageIcon>smalllogo.png</PackageIcon>
<RepositoryType>GitHub</RepositoryType>
<PackageTags>$(PackageTags) Converter Math Arbitrary Expressions XAML ConverterParameter IValueConverter IMultiValueConverter</PackageTags>
<PackageReadmeFile Condition="'$(MSBuildRuntimeType)' != 'Mono'">README.md</PackageReadmeFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeSymbols>true</IncludeSymbols>
Expand All @@ -30,6 +31,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<None Include="$(MSBuildThisFileDirectory)..\..\..\ReadmeAssets\smalllogo.png" Pack="True" PackagePath="smalllogo.png" Link="Assets\smalllogo.png" />
<None Include="$(MSBuildThisFileDirectory)..\..\..\Nuget README.md" Pack="True" PackagePath="README.md" Link="Assets\README.md" />
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)" />
</ItemGroup>

Expand Down

0 comments on commit 8e3193a

Please sign in to comment.