bloxstrap/Bloxstrap/UI/Converters/StringResourceConverter.cs
2024-11-29 20:43:01 +00:00

25 lines
682 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Xml.Linq;
namespace Bloxstrap.UI.Converters
{
class StringResourceConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return Strings.ResourceManager.GetStringSafe((string)value);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}
}