Files
C4IT-F4SD-Client/FasdDesktopUi/Basics/Converter/LanguageCultureConverter.cs
Meik 0b52999b1d feat: expand cockpit integrations and support workflows
Add Phoenix remote desktop, action connector, documentation engine, and gamification support. Refactor support-case processing and search/action UI, and update installer assets and dependencies.
2026-07-13 11:16:53 +02:00

28 lines
814 B
C#

using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;
namespace FasdDesktopUi.Basics.Converter
{
[ValueConversion(typeof(string), typeof(XmlLanguage))]
internal class LanguageCultureConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (!(value is string tag))
return Binding.DoNothing;
return XmlLanguage.GetLanguage(tag);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (!(value is XmlLanguage lang))
return Binding.DoNothing;
return lang.IetfLanguageTag;
}
}
}