mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-30 06:46:19 +00:00
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:
parent
1d4c5876c9
commit
fcf1e9d23a
3 changed files with 662 additions and 650 deletions
|
@ -1,9 +0,0 @@
|
||||||
using System.Windows.Controls;
|
|
||||||
|
|
||||||
namespace v2rayN.Base
|
|
||||||
{
|
|
||||||
internal class MyDGTextColumn : DataGridTextColumn
|
|
||||||
{
|
|
||||||
public string ExName { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
20
v2rayN/v2rayN/Base/MyDgTextColumnAttachedProperties.cs
Normal file
20
v2rayN/v2rayN/Base/MyDgTextColumnAttachedProperties.cs
Normal 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
Loading…
Reference in a new issue