Files
Lattice/Lattice.Example.DragDrop/PriorityToTextConverter.cs
2026-01-25 07:56:35 +03:00

27 lines
694 B
C#

using Microsoft.UI.Xaml.Data;
using System;
namespace Lattice.Example.DragDrop;
public class PriorityToTextConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is int priority)
{
return priority switch
{
1 => "🔥 High",
2 => "⚠️ Medium",
3 => "📋 Low",
_ => $"Priority {priority}"
};
}
return "Normal";
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}