Change ExName to Attached Property

It is more powerfull and better then inherence and we can use colour emojies easier.
This commit is contained in:
Private 2024-06-18 15:48:29 +03:30
parent 1d4c5876c9
commit fcf1e9d23a
3 changed files with 662 additions and 650 deletions

View file

@ -1,9 +0,0 @@
using System.Windows.Controls;
namespace v2rayN.Base
{
internal class MyDGTextColumn : DataGridTextColumn
{
public string ExName { get; set; }
}
}

View file

@ -0,0 +1,20 @@
using System.Windows;
namespace v2rayN.Base
{
public static class MyDgTextColumnAttachedProperties
{
public static readonly DependencyProperty ExNameProperty =
DependencyProperty.RegisterAttached("ExName", typeof(string), typeof(MyDgTextColumnAttachedProperties), new PropertyMetadata(default(string)));
public static void SetExName(DependencyObject element, string value)
{
element.SetValue(ExNameProperty, value);
}
public static string GetExName(DependencyObject element)
{
return (string)element.GetValue(ExNameProperty);
}
}
}

File diff suppressed because it is too large Load diff