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); } } }