Ejemplo n.º 1
0
        private void alignment_ToggleStateChanging(object sender, Telerik.WinControls.UI.StateChangingEventArgs args)
        {
            CommandBarToggleButton senderButton = (sender as CommandBarToggleButton);

            if (args.NewValue == Telerik.WinControls.Enumerations.ToggleState.Off)
            {
                return;
            }

            if (senderButton != radCommandBarToggleButtonItem4)
            {
                radCommandBarToggleButtonItem4.ToggleState = Telerik.WinControls.Enumerations.ToggleState.Off;
            }

            if (senderButton != radCommandBarToggleButtonItem5)
            {
                radCommandBarToggleButtonItem5.ToggleState = Telerik.WinControls.Enumerations.ToggleState.Off;
            }

            if (senderButton != radCommandBarToggleButtonItem6)
            {
                radCommandBarToggleButtonItem6.ToggleState = Telerik.WinControls.Enumerations.ToggleState.Off;
            }

            if (senderButton != radCommandBarToggleButtonItem7)
            {
                radCommandBarToggleButtonItem7.ToggleState = Telerik.WinControls.Enumerations.ToggleState.Off;
            }
        }
Ejemplo n.º 2
0
 private void OnToggleStateChanging(StateChangingEventArgs args)
 {
     if (this.ToggleStateChanging == null)
     {
         return;
     }
     this.ToggleStateChanging((object)this, args);
 }
Ejemplo n.º 3
0
 private void ToggleElement_ToggleStateChanging(object sender, StateChangingEventArgs args)
 {
     if (this.IsInValidState(true))
     {
         this.node.CheckState = args.NewValue;
         args.Cancel          = this.node.CheckState != args.NewValue;
     }
 }
Ejemplo n.º 4
0
        protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
        {
            StateChangingEventHandler handler1 = (StateChangingEventHandler)base.Events[RadMenuItem.ToggleStateChangingEventKey];

            if (handler1 != null)
            {
                handler1(this, e);
            }
        }
Ejemplo n.º 5
0
        protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
        {
            StateChangingEventHandler handler1 = (StateChangingEventHandler)this.Events[RadToggleButton.StateChangingEventKey];

            if (handler1 != null)
            {
                handler1(this, e);
            }
        }
Ejemplo n.º 6
0
 protected override bool OnToggleButtonStateChanging(StateChangingEventArgs args)
 {
     if (this.IsInValidState(true))
     {
         (this.Data as ListViewDataItemGroup).Expanded = args.NewValue == ToggleState.On;
         args.Cancel = (this.Data as ListViewDataItemGroup).Expanded != (args.NewValue == ToggleState.On);
     }
     return(args.Cancel);
 }
Ejemplo n.º 7
0
        protected virtual bool OnToggleButtonStateChanging(StateChangingEventArgs args)
        {
            if (this.IsInValidState(true))
            {
                this.dataItem.CheckState = args.NewValue;
                args.Cancel = this.dataItem.CheckState != args.NewValue;
            }

            return(args.Cancel);
        }
Ejemplo n.º 8
0
        protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
        {
            StateChangingEventHandler changingEventHandler = (StateChangingEventHandler)this.Events[RadMenuItem.ToggleStateChangingEventKey];

            if (changingEventHandler == null)
            {
                return;
            }
            changingEventHandler((object)this, e);
        }
Ejemplo n.º 9
0
        private void ToggleElement_ToggleStateChanging(object sender, StateChangingEventArgs args)
        {
            if (!this.IsInValidState(true))
            {
                return;
            }
            RadTreeNode node = this.node;

            node.CheckState = args.NewValue;
            args.Cancel     = node.CheckState != args.NewValue;
        }
        protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
        {
            if (e.NewValue == ToggleState.Indeterminate && !this.isTreeState)
            {
                e.Cancel = true;
            }

            if (this.ToggleStateChanging != null)
            {
                this.ToggleStateChanging(this, e);
            }
        }
Ejemplo n.º 11
0
        private void checkBox_ToggleStateChanging(object sender, StateChangingEventArgs args)
        {
            RadCheckedListDataItem data = (RadCheckedListDataItem)this.Data;
            bool flag = args.NewValue == Telerik.WinControls.Enumerations.ToggleState.On;

            if (data.Checked == flag)
            {
                return;
            }
            data.Checked = flag;
            args.Cancel  = data.Checked != flag;
        }
Ejemplo n.º 12
0
 protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
 {
     if (e.NewValue == Telerik.WinControls.Enumerations.ToggleState.Indeterminate && !this.isTreeState)
     {
         e.Cancel = true;
     }
     if (this.ToggleStateChanging == null)
     {
         return;
     }
     this.ToggleStateChanging((object)this, e);
 }
Ejemplo n.º 13
0
        protected override void OnToggleStateChanging(StateChangingEventArgs e)
        {
            base.OnToggleStateChanging(e);

            if (e.Cancel && e.NewValue == Telerik.WinControls.Enumerations.ToggleState.Indeterminate && !this.IsThreeState)
            {
                TreeNodeElement nodeElement = this.NodeElement;

                if (nodeElement != null && nodeElement.TreeViewElement.TriStateMode)
                {
                    e.Cancel = false;
                }
            }
        }
Ejemplo n.º 14
0
        protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
        {
            if (e.NewValue == Telerik.WinControls.Enumerations.ToggleState.Indeterminate && !this.isTreeState)
            {
                e.Cancel = true;
            }
            StateChangingEventHandler changingEventHandler = (StateChangingEventHandler)this.Events[RadToggleButtonElement.StateChangingEventKey];

            if (changingEventHandler == null)
            {
                return;
            }
            changingEventHandler((object)this, e);
        }
Ejemplo n.º 15
0
        protected virtual void OnToggleStateChanging(StateChangingEventArgs e)
        {
            if (e.NewValue == ToggleState.Indeterminate && !this.isTreeState)
            {
                e.Cancel = true;
            }

            StateChangingEventHandler handler1 = (StateChangingEventHandler)base.Events[RadToggleButtonElement.StateChangingEventKey];

            if (handler1 != null)
            {
                handler1(this, e);
            }
        }
Ejemplo n.º 16
0
        protected override void OnToggleStateChanging(StateChangingEventArgs e)
        {
            base.OnToggleStateChanging(e);
            if (!e.Cancel || e.NewValue != ToggleState.Indeterminate || this.IsThreeState)
            {
                return;
            }
            TreeNodeElement nodeElement = this.NodeElement;

            if (nodeElement == null || !nodeElement.TreeViewElement.TriStateMode)
            {
                return;
            }
            e.Cancel = false;
        }
 protected virtual void OnToggleStateChanging(StateChangingEventArgs args)
 {
     if (this.PropertyTableElement.ReadOnly)
     {
         args.Cancel = true;
     }
     else
     {
         PropertyGridItem data = this.Data as PropertyGridItem;
         if (!data.ReadOnly || data.Accessor is ImmutableItemAccessor)
         {
             return;
         }
         args.Cancel = true;
     }
 }
Ejemplo n.º 18
0
        void alphabeticalPropertySort_ToggleStateChanging(object sender, StateChangingEventArgs args)
        {
            this.PropertyGridElement.PropertyTableElement.EndEdit();
            if (args.NewValue == ToggleState.On)
            {
                this.categorizedAlphabeticalPropertySort.ToggleStateChanging -= categorizedAlphabeticalPropertySort_ToggleStateChanging;
                this.categorizedAlphabeticalPropertySort.ToggleState          = ToggleState.Off;
                this.categorizedAlphabeticalPropertySort.ToggleStateChanging += categorizedAlphabeticalPropertySort_ToggleStateChanging;

                this.PropertyGridElement.PropertyTableElement.PropertySort = PropertySort.Alphabetical;
            }
            else
            {
                args.Cancel = true;
            }
        }
Ejemplo n.º 19
0
        private void SetToggleStateCore(Telerik.WinControls.Enumerations.ToggleState value)
        {
            StateChangingEventArgs e1 = new StateChangingEventArgs(this.ToggleState, value, false);

            this.OnToggleStateChanging(e1);
            CheckStateChangingEventArgs e2 = new CheckStateChangingEventArgs((CheckState)this.ToggleState, (CheckState)value, e1.Cancel);

            this.OnCheckStateChanging(e2);
            if (e2.Cancel)
            {
                return;
            }
            int         num1        = (int)this.SetValue(RadToggleButtonElement.ToggleStateProperty, (object)value);
            RoutedEvent routedEvent = RadToggleButtonElement.Indeterminate;

            switch (this.ToggleState)
            {
            case Telerik.WinControls.Enumerations.ToggleState.Off:
                routedEvent = RadToggleButtonElement.Unchecked;
                break;

            case Telerik.WinControls.Enumerations.ToggleState.On:
                routedEvent = RadToggleButtonElement.CheckedRoutedEvent;
                break;
            }
            this.RaiseRoutedEvent((RadElement)this, new RoutedEventArgs(EventArgs.Empty, routedEvent));
            this.OnToggleStateChanged(new StateChangedEventArgs(this.ToggleState));
            this.OnCheckStateChanged(EventArgs.Empty);
            this.OnNotifyPropertyChanged("ToggleState");
            this.OnNotifyPropertyChanged("CheckState");
            this.OnNotifyPropertyChanged("IsChecked");
            foreach (RadObject radObject in this.ChildrenHierarchy)
            {
                int num2 = (int)radObject.SetValue(RadToggleButtonElement.ToggleStateProperty, (object)value);
            }
        }
Ejemplo n.º 20
0
 private void ButtonElement_ToggleStateChanging(object sender, StateChangingEventArgs args)
 {
     base.OnToggleStateChanging(args);
 }
Ejemplo n.º 21
0
 void toggleButton_ToggleStateChanging(object sender, StateChangingEventArgs args)
 {
     args.Cancel = this.OnToggleButtonStateChanging(args);
 }
 private void checkBoxElement_ToggleStateChanging(object sender, StateChangingEventArgs args)
 {
     this.OnToggleStateChanging(args);
 }
Ejemplo n.º 23
0
 protected override void ButtonElement_ToggleStateChanging(
     object sender,
     StateChangingEventArgs args)
 {
     this.OnToggleStateChanging(args);
 }