Example #1
0
        private static object CoerceIsChecked(DependencyObject d, object basevalue)
        {
            var button = (SplitButton)d;

            if (button.IsCheckable == false)
            {
                return(false);
            }

            return(ToggleButtonHelper.CoerceIsChecked(d, basevalue));
        }
Example #2
0
        private static object CoerceIsChecked(DependencyObject d, object basevalue)
        {
            SplitButton button = d as SplitButton;

            if (!button.IsCheckable)
            {
                return(false);
            }

            return(ToggleButtonHelper.CoerceIsChecked(d, basevalue));
        }
Example #3
0
        private static void OnIsCheckedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var button = (SplitButton)d;

            if (button.IsCheckable)
            {
                if ((bool)e.NewValue)
                {
                    button.RaiseEvent(new RoutedEventArgs(CheckedEvent, button));
                }
                else
                {
                    button.RaiseEvent(new RoutedEventArgs(UncheckedEvent, button));
                }

                ToggleButtonHelper.OnIsCheckedChanged(d, e);
            }
        }
Example #4
0
 /// <inheritdoc />
 protected override void OnChecked(RoutedEventArgs e)
 {
     ToggleButtonHelper.UpdateButtonGroup(this);
     base.OnChecked(e);
 }