Idk, dev work goin on

This commit is contained in:
2026-09-09 16:19:45 +03:00 Unverified
parent b0d8bcd742
commit 17a0a9f7a6
318 changed files with 11908 additions and 81 deletions
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Markup;
namespace WinWARP.Ui.Converters;
[MarkupExtensionReturnType(ReturnType = typeof(IValueConverter))]
public class CountryCodeToUriConverter : MarkupExtension, IValueConverter
{
protected override object ProvideValue() => this;
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is string countryCode)
{
if (!string.IsNullOrWhiteSpace(countryCode))
{
return new Uri($"ms-appx:///Assets/Flags/{countryCode.ToLower()}.svg");
}
else
{
return new Uri("ms-appx:///Assets/Flags/xx.svg");
}
}
else return null;
}
public object ConvertBack(object value, Type targetType, object parameter, string language) => throw new NotImplementedException();
}