private static ColumnSortBehavior GetOrSetBehavior(DependencyObject sender) { var behavior = GetColumnSortingBehavior(sender); if (behavior == null) { behavior = new ColumnSortBehavior(); SetColumnSortingBehavior(sender, behavior); } return(behavior); }
private static ColumnSortBehavior GetOrSetBehavior(DependencyObject sender) { var behavior = GetColumnSortingBehavior(sender); if (behavior == null) { behavior = new ColumnSortBehavior(); SetColumnSortingBehavior(sender, behavior); } return behavior; }
private static void SetColumnSortingBehavior(DependencyObject obj, ColumnSortBehavior value) { obj.SetValue(ColumnSortingBehaviorProperty, value); }