Added resource classses and a missing converter.

This commit is contained in:
2025-03-24 23:31:01 -04:00
parent 9245e9c4cc
commit 97f6040122
14 changed files with 507 additions and 49 deletions

View File

@@ -0,0 +1,25 @@
using Microsoft.UI.Xaml.Data;
using System;
namespace Harmonia.WinUI.Converters;
public sealed partial class DoubleToPercentConverter : IValueConverter
{
public DoubleToPercentConverter()
{
}
public object? Convert(object value, Type targetType, object parameter, string language)
{
if (value is not double doubleValue)
return null;
return Math.Round(doubleValue * 100) + "%";
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}