2024-12-21 13:11:30 +03:00
|
|
|
using Avalonia;
|
|
|
|
|
using Avalonia.Controls;
|
|
|
|
|
using Avalonia.Data.Converters;
|
|
|
|
|
using Avalonia.Media;
|
|
|
|
|
|
|
|
|
|
namespace Nebula.Launcher.Converters;
|
|
|
|
|
|
|
|
|
|
public class TypeConverters
|
|
|
|
|
{
|
2025-01-18 18:20:11 +03:00
|
|
|
public static FuncValueConverter<string, string?> IconConverter { get; } =
|
2024-12-21 13:11:30 +03:00
|
|
|
new(iconKey =>
|
|
|
|
|
{
|
2025-01-18 18:20:11 +03:00
|
|
|
if (iconKey == null) return null;
|
|
|
|
|
return $"/Assets/svg/{iconKey}.svg";
|
2024-12-21 13:11:30 +03:00
|
|
|
});
|
|
|
|
|
}
|