using System; using System.Globalization; using System.Windows.Controls; using System.Windows.Data; namespace VirgoUI.Client.Models.PMs { /// /// Interaction logic for IOView.xaml /// public partial class PmIoView : UserControl { public PmIoView() { InitializeComponent(); } } public class DisplayNameConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value is string s1) { int idx = s1.IndexOf('_'); return s1.Substring(idx + 1); } return value; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }