Table of Contents

Class NumericEditor

Namespace
NanoByte.Common.Values.Design
Assembly
NanoByte.Common.WinForms.dll

Abstract base class for drop-down PropertyGrid editors that can be associated with float or double properties.

public abstract class NumericEditor : UITypeEditor
Inheritance
object
NumericEditor
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

context ITypeDescriptorContext
provider IServiceProvider
value object

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

value double

The current value.

range RangeAttribute

The range of valid values the user can select.

editorService IWindowsFormsEditorService

The 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

value double

The current value.

editorService IWindowsFormsEditorService

The 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

context ITypeDescriptorContext

Returns

UITypeEditorEditStyle

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

value object
doubleValue double

Returns

bool