Пример #1
0
        private static CheckedBehavior GetOrCreateBehavior(CheckBox element)
        {
            var behavior = element.GetValue(CheckedBehaviorProperty) as CheckedBehavior;

            if (behavior == null)
            {
                behavior = new CheckedBehavior(element);
                element.SetValue(CheckedBehaviorProperty, behavior);
            }

            return(behavior);
        }
Пример #2
0
 public static void SetCheckedBehavior(DependencyObject obj,
                                       CheckedBehavior value)
 {
     obj.SetValue(CheckedBehaviorProperty, value);
 }