Files

32 lines
1.1 KiB
C#
Raw Permalink Normal View History

using System.Windows;
namespace BeWo.Scheduling.SchedulingUtils
{
public class TreeViewItemHelper : DependencyObject
{
public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.RegisterAttached("IsChecked", typeof(bool?), typeof(TreeViewItemHelper), new PropertyMetadata(false, null));
public static void SetIsChecked(DependencyObject element, bool? isChecked)
{
element.SetValue(IsCheckedProperty, isChecked);
}
public static bool? GetIsChecked(DependencyObject element)
{
return (bool?) element.GetValue(IsCheckedProperty);
}
public static readonly DependencyProperty ParentProperty = DependencyProperty.RegisterAttached("Parent", typeof(object), typeof(TreeViewItemHelper));
public static void SetParent(DependencyObject element, object Parent)
{
element.SetValue(ParentProperty, Parent);
}
public static object GetParent(DependencyObject element)
{
return element.GetValue(ParentProperty);
}
}
}