添加项目文件。
This commit is contained in:
43
MSDevTool/Attached/ObjectType.cs
Normal file
43
MSDevTool/Attached/ObjectType.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace MSDevTool.Attached
|
||||
{
|
||||
public class ObjectType
|
||||
{
|
||||
public static bool GetIsMatchObject(DependencyObject obj)
|
||||
{
|
||||
return (bool)obj.GetValue(IsMatchObjectProperty);
|
||||
}
|
||||
|
||||
public static void SetIsMatchObject(DependencyObject obj, bool value)
|
||||
{
|
||||
obj.SetValue(IsMatchObjectProperty, value);
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for MatchObject. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty IsMatchObjectProperty =
|
||||
DependencyProperty.RegisterAttached("IsMatchObject", typeof(bool), typeof(ObjectType), new PropertyMetadata(false));
|
||||
|
||||
|
||||
|
||||
public static SolidColorBrush GetMatchColor(DependencyObject obj)
|
||||
{
|
||||
return (SolidColorBrush)obj.GetValue(MatchColorProperty);
|
||||
}
|
||||
|
||||
public static void SetMatchColor(DependencyObject obj, int value)
|
||||
{
|
||||
obj.SetValue(MatchColorProperty, value);
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty MatchColorProperty =
|
||||
DependencyProperty.RegisterAttached("MatchColor", typeof(SolidColorBrush), typeof(ObjectType), new PropertyMetadata(null));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user