Inheritance: ButtonBaseAutomationPeer, IToggleButtonAutomationPeer, IToggleProvider
Exemplo n.º 1
0
        internal void RaiseToggleStatePropertyChangedEvent(object pOldValue, object pNewValue)
        {
            var oldValue = ToggleButtonAutomationPeer.ConvertToToggleState(pOldValue);
            var newValue = ToggleButtonAutomationPeer.ConvertToToggleState(pNewValue);

            MUX_ASSERT(oldValue != ToggleState.Indeterminate);
            MUX_ASSERT(newValue != ToggleState.Indeterminate);

            if (oldValue != newValue)
            {
                RaisePropertyChangedEvent(TogglePatternIdentifiers.ToggleStateProperty, oldValue, newValue);
            }
        }
        public ToolBarToggleButton()
        {
            this.DefaultStyleKey = typeof(ToolBarToggleButton);

            this.peer = new ToggleButtonAutomationPeer(this);
        }