part of manager main window

This commit is contained in:
Pascal
2025-11-14 08:10:42 +01:00
parent d798eea1d8
commit cd766f73fc
3 changed files with 225 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
using System.Collections;
using System.Globalization;
using Avalonia.Data.Converters;
namespace ModpackUpdater.Apps.Manager;
public class DictionaryValueConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (parameter is IDictionary dict && value != null && dict.Contains(value))
return dict[value];
return value?.ToString() ?? string.Empty;
}
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}