private static void AttachBehavior(FrameworkElement element) { var proxy = element.DataContext as ColumnHeaderContainer.TreeItemProxy; var behavior = new ColumnHeaderExtensions { proxy = proxy }; behavior.Attach(element); SetBehavior(element, behavior); }
private static void SetBehavior(DependencyObject obj, ColumnHeaderExtensions value) { obj.SetValue(BehaviorProperty, value); }