Example #1
0
        private static CheckBoxClickCommandBehavior GetOrCreateBehavior(CheckBox clicker)
        {
            var behavior = clicker.GetValue(ClickCommandBehaviorProperty) as CheckBoxClickCommandBehavior;
            if (behavior == null)
            {
                behavior = new CheckBoxClickCommandBehavior(clicker);
                clicker.SetValue(ClickCommandBehaviorProperty, behavior);
            }

            return behavior;
        }
Example #2
0
 /// <summary>
 /// Retrieves the <see cref="ICommand"/> attached to the <see cref="TextBox"/>.
 /// </summary>
 /// <param name="selector">TextBox containing the Command dependency property</param>
 /// <returns>The value of the command attached</returns>
 public static ICommand GetCommand(CheckBox clicker)
 {
     return clicker.GetValue(CommandProperty) as ICommand;
 }
 public static bool GetCanSelectedAll(CheckBox obj)
 {
     return (bool)obj.GetValue(CanSelectedAllProperty);
 }