Exemple #1
0
        private static ClickedBehavior GetOrCreateBehavior(ButtonBase element)
        {
            var behavior = element.GetValue(ClickedBehaviorProperty) as ClickedBehavior;

            if (behavior == null)
            {
                behavior = new ClickedBehavior(element);
                element.SetValue(ClickedBehaviorProperty, behavior);
            }

            return(behavior);
        }
Exemple #2
0
 public static void SetClickedBehavior(DependencyObject obj,
                                       ClickedBehavior value)
 {
     obj.SetValue(ClickedBehaviorProperty, value);
 }