Exemplo n.º 1
0
        private static object CoerceIsChecked(DependencyObject d, object basevalue)
        {
            SplitButton button = d as SplitButton;

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

            return(ToggleButtonHelper.CoerceIsChecked(d, basevalue));
        }
Exemplo n.º 2
0
        private static void OnIsCheckedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SplitButton button = d as SplitButton;

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

                ToggleButtonHelper.OnIsCheckedChanged(d, e);
            }
        }