Class NumericEditor
Abstract base class for drop-down PropertyGrid editors that can be associated with float or double properties.
public abstract class NumericEditor : UITypeEditor
- Inheritance
-
objectNumericEditor
- Derived
- Inherited Members
- Extension Methods
Constructors
NumericEditor()
protected NumericEditor()
Methods
EditValue(ITypeDescriptorContext?, IServiceProvider?, object?)
public override object EditValue(ITypeDescriptorContext? context, IServiceProvider? provider, object? value)
Parameters
contextITypeDescriptorContextproviderIServiceProvidervalueobject
Returns
- object
EditValue(double, RangeAttribute, IWindowsFormsEditorService)
Displays the UI to edit the float value.
protected abstract double EditValue(double value, RangeAttribute range, IWindowsFormsEditorService editorService)
Parameters
valuedoubleThe current value.
rangeRangeAttributeThe range of valid values the user can select.
editorServiceIWindowsFormsEditorServiceThe editor service used to display the dropdown control.
Returns
- double
The value set by the user.
EditValue(double, IWindowsFormsEditorService)
Displays the UI to edit the float value.
protected abstract double EditValue(double value, IWindowsFormsEditorService editorService)
Parameters
valuedoubleThe current value.
editorServiceIWindowsFormsEditorServiceThe editor service used to display the dropdown control.
Returns
- double
The value set by the user.
GetEditStyle(ITypeDescriptorContext?)
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext? context)
Parameters
contextITypeDescriptorContext
Returns
TryGetDouble(object?, out double)
Interprets value as a double if it is a float or double.
protected bool TryGetDouble(object? value, out double doubleValue)
Parameters
valueobjectdoubleValuedouble