New to Telerik UI for WinForms? Start a free 30-day trial

Represents class that describes RadSpreadsheetElement command.

Definition

Namespace:Telerik.WinForms.Controls.Spreadsheet.Commands.Descriptors

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Syntax:

C#
public class CommandDescriptor : RadObject, INotifyPropertyChanged, ICustomTypeDescriptor, IDisposable

Inheritance: objectDisposableObjectRadObjectCommandDescriptor

Implements: ICustomTypeDescriptorIDisposableINotifyPropertyChanged

Inherited Members RadObject.BindingContextPropertyRadObject.RadTypeRadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.GetValue(RadProperty)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.SetValueCore(RadPropertyValue, object, object, ValueSource)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.AddStylePropertySetting(IPropertySetting)RadObject.GetInheritedValue(RadProperty)RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.IsPropertyCancelable(RadPropertyMetadata)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.PerformDispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.BitStateDisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing...

Constructors

Initializes a new instance of the CommandDescriptor class.

C#
public CommandDescriptor(ICommand command, bool isEnabled = true, object selectedValue = null)
Parameters:commandICommand

The command.

isEnabledbool

The is enabled.

selectedValueobject

The selected value.

Fields

Gets the default CommandDescriptor.

C#
public static readonly CommandDescriptor Default

Gets the default CommandDescriptor for commands which selected value is .

C#
public static readonly CommandDescriptor DefaultBool

Gets the default CommandDescriptor for commands which selected value is Color.

C#
public static readonly CommandDescriptor DefaultColor

Gets the default CommandDescriptor for commands which selected value is .

C#
public static readonly CommandDescriptor DefaultDouble

Gets the default CommandDescriptor for commands which selected value is .

C#
public static readonly CommandDescriptor DefaultInt

Identifies IsEnabled; changing it also updates IsVisible to visible or collapsed.

C#
public static RadProperty IsEnabledProperty

Identifies the visibility state used to show or collapse a command descriptor in its UI.

C#
public static RadProperty IsVisibleProperty

Identifies SelectedValue, the current value associated with the command.

C#
public static RadProperty SelectedValueProperty

Properties

Gets the command.

C#
public ICommand Command { get; }
Property Value:

The command.

Gets or sets a value indicating whether the command descriptor is enabled.

C#
public bool IsEnabled { get; set; }
Property Value:

The value indicating whether the command descriptor is enabled.

Gets or sets a value indicating whether any GUI for this command should be visible.

C#
public ElementVisibility IsVisible { get; set; }
Property Value:

The value indicating whether the command descriptor should be visible in a GUI.

Gets or sets the selected value.

C#
public object SelectedValue { get; set; }
Property Value:

The selected value.

Methods

Stops and disposes the delayed state update used by this descriptor.

C#
protected override void DisposeManagedResources()

Overrides: RadObject.DisposeManagedResources()

Synchronizes IsVisible with IsEnabled so disabled commands are collapsed in the UI.

C#
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters:eRadPropertyChangedEventArgs

Details of the property change.

Overrides: RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)