migration
All checks were successful
Build and publish package / Build (push) Successful in 31s
Build and publish package / Determine version (push) Successful in 18s
Build and publish package / Pack (push) Successful in 29s
Build and publish package / Publish (push) Successful in 15s

This commit is contained in:
2026-02-15 18:36:02 +01:00
Unverified
parent 7c019a6a51
commit c0d5eb5d92
12 changed files with 832 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
using Microsoft.UI.Xaml.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleToolkit.UI.WinUI.Converters
{
public class ObjectToIntConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return (int)value;
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,19 @@
using Microsoft.UI.Xaml.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleToolkit.UI.WinUI.Converters
{
public class ObjectToStringConverter : IValueConverter
{
#region METHODS
public object Convert(object value, Type targetType, object parameter, string language) => value.ToString();
public object ConvertBack(object value, Type targetType, object parameter, string language) => throw new NotImplementedException();
#endregion
}
}

View File

@@ -0,0 +1,57 @@
# SimpleToolkit.UI.WinUI.Converters
### Set of helpers, class extensions, UI controls used in my other C# projects
SimpleToolkit is package of useful classes, helpers, extensions and UI controls, I use in my C# projects. UI.WinUI.Converters subpackage contains XAML value converters for WinUI applications.
---
## NuGet registry status
| Subpackage | Status |
|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **SimpleToolkit.UI.WinUI.Converters** | [![NuGet version (SimpleToolkit.UI.WinUI.Converters)](https://img.shields.io/nuget/v/SimpleToolkit.UI.WinUI.Converters.svg?style=flat-square)](https://www.nuget.org/packages/SimpleToolkit.UI.WinUI.Converters/) |
| SimpleToolkit.Extensions | [![NuGet version (SimpleToolkit.Extensions)](https://img.shields.io/nuget/v/SimpleToolkit.Extensions.svg?style=flat-square)](https://www.nuget.org/packages/SimpleToolkit.Extensions/) |
| SimpleToolkit.Attributes | [![NuGet version (SimpleToolkit.Attributes)](https://img.shields.io/nuget/v/SimpleToolkit.Attributes.svg?style=flat-square)](https://www.nuget.org/packages/SimpleToolkit.Attributes/) |
| SimpleToolkit.MVVM | [![NuGet version (SimpleToolkit.MVVM)](https://img.shields.io/nuget/v/SimpleToolkit.MVVM.svg?style=flat-square)](https://www.nuget.org/packages/SimpleToolkit.MVVM/) |
| SimpleToolkit.UI.Models | [![NuGet version (SimpleToolkit.UI.Models)](https://img.shields.io/nuget/v/SimpleToolkit.UI.Models.svg?style=flat-square)](https://www.nuget.org/packages/SimpleToolkit.UI.Models/) |
| SimpleToolkit.UI.WinUI.Behaviors | [![NuGet version (SimpleToolkit.UI.WinUI.Behaviors)](https://img.shields.io/nuget/v/SimpleToolkit.UI.WinUI.Behaviors.svg?style=flat-square)](https://www.nuget.org/packages/SimpleToolkit.UI.WinUI.Behaviors/) |
| SimpleToolkit.UI.WinUI.Controls | [![NuGet version (SimpleToolkit.UI.WinUI.Controls)](https://img.shields.io/nuget/v/SimpleToolkit.UI.WinUI.Controls.svg?style=flat-square)](https://www.nuget.org/packages/SimpleToolkit.UI.WinUI.Controls/) |
| SimpleToolkit.UI.WinUI.Helpers | [![NuGet version (SimpleToolkit.UI.WinUI.Helpers)](https://img.shields.io/nuget/v/SimpleToolkit.UI.WinUI.Helpers.svg?style=flat-square)](https://www.nuget.org/packages/SimpleToolkit.UI.WinUI.Helpers/) |
## Features
- **ObjectToIntConverter** - converts any object to int (e.g. enums)
- **ObjectToStringConverter** - converts any object to string
## Dependencies
Dependencies should be installed automatically with this package
- Microsoft.WindowsAppSDK 1.4.240211001
## Installation and usage
You can download package from official NuGet registry or .nupkg file itself from Releases tab.
**CLI:**
```
dotnet add package SimpleToolkit.UI.WinUI.Converters
```
**Package reference in .csproj file:**
```
<PackageReference Include="SimpleToolkit.UI.WinUI.Converters" Version="<version>" />
```
## Attribution and contribution
This project is open source on MIT License, so you can just copy and upload again to your repository. But according to the license, you must include information about the original author. You can find license [here](https://repos.mateuszskoczek.com/SimpleToolkit/SimpleToolkit.UI.WinUI.Converters/src/branch/main/LICENSE).
However, the preferred way to contribute would be to propose improvements in a pull request, through issues, or through other means of communication.
**Other sources:**
- Icon by [Icons8](icons8.com)

View File

@@ -0,0 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>SimpleToolkit.UI.WinUI.Converters</RootNamespace>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
<UseRidGraph>true</UseRidGraph>
<PackageReadmeFile>README.md</PackageReadmeFile>
<EnableCoreMrtTooling Condition=" '$(BuildingInsideVisualStudio)' != 'true' ">false</EnableCoreMrtTooling>
<Nullable>enable</Nullable>
<Title>SimpleToolkit.UI.WinUI.Converters</Title>
<Authors>Mateusz Skoczek</Authors>
<Copyright>Mateusz Skoczek</Copyright>
<PackageProjectUrl>https://repos.mateuszskoczek.com/SimpleToolkit/</PackageProjectUrl>
<PackageLicenseUrl>https://repos.mateuszskoczek.com/SimpleToolkit/SimpleToolkit.UI.WinUI.Converters/src/branch/main/LICENSE</PackageLicenseUrl>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://repos.mateuszskoczek.com/SimpleToolkit/SimpleToolkit.UI.WinUI.Converters</RepositoryUrl>
<Description>Set of helpers, class extensions, UI controls used in my other C# projects - XAML value converters for WinUI applications</Description>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
</PropertyGroup>
<ItemGroup>
<None Update="icon.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Update="README.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.240211001" />
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB