示例#1
0
        protected virtual void OnCheckStateChanging(CheckStateChangingEventArgs e)
        {
            CheckStateChangingEventHandler changingEventHandler = (CheckStateChangingEventHandler)this.Events[RadToggleButtonElement.CheckStateChangingEventKey];

            if (changingEventHandler == null)
            {
                return;
            }
            changingEventHandler((object)this, e);
        }
示例#2
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);
            }
        }
示例#3
0
 protected override void res_CheckStateChanging(object sender, CheckStateChangingEventArgs args)
 {
     this.OnCheckStateChanging(args);
 }
示例#4
0
 protected virtual void res_CheckStateChanging(object sender, CheckStateChangingEventArgs args)
 {
     this.OnCheckStateChanging(args);
 }