Table of Contents

Class ComboBoxEditorAttribute

Namespace
OFT.Attributes.Editors
Assembly
OFT.Attributes.dll

Edits a setting with a drop-down list. The items are given in the attribute or come from a collection type.

[AttributeUsage(AttributeTargets.Property)]
public class ComboBoxEditorAttribute : Attribute
Inheritance
object
Attribute
ComboBoxEditorAttribute
Derived
Extension Methods

Constructors

ComboBoxEditorAttribute(params object[])

Configure ComboBox editor attribute.

        <p>Added in ATAS 8.0.15.</p>
public ComboBoxEditorAttribute(params object[] itemsSource)

Parameters

itemsSource object[]

Elements dor selection in ComboBox.

ComboBoxEditorAttribute(Type)

Configure ComboBox editor attribute.

       <p>Added in ATAS 8.0.15.</p>
public ComboBoxEditorAttribute(Type typeSource)

Parameters

typeSource Type

Source type must inherit from System.Collections.IEnumerable.

Exceptions

ArgumentNullException

Parameter typeSource is null.

ArgumentException

Parameter typeSource not inherited from System.Collections.IEnumerable or constructor has more than one parameter.

Properties

AutoComplete

Gets or sets whether the automatic completion is enabled.

public bool AutoComplete { get; set; }

Property Value

bool

DisplayMember

Gets or sets a member name in the bound data source whose values are displayed by the editor.

public string DisplayMember { get; set; }

Property Value

string

IsTextEditable

Gets or sets whether end-users are allowed to edit the text displayed in the edit box.

public bool IsTextEditable { get; set; }

Property Value

bool

ItemsSource

Get or set data source for selection.

public object[] ItemsSource { get; set; }

Property Value

object[]

ReloadItemsSourceOnConditionChange

When combined with EnabledWhenAttribute, rebuilds the editor's items source every time the gating property changes. Use this when the available items depend on another property (e.g. a graphics-adapter list that differs per selected renderer).

Added in ATAS 8.0.15.

public bool ReloadItemsSourceOnConditionChange { get; set; }

Property Value

bool

SelectItemWithNullValue

Gets or sets whether the editor searches for a null item in the bound data source when the editor value is null (empty).

public bool SelectItemWithNullValue { get; set; }

Property Value

bool

ValueMember

Gets or sets a member name in the bound data source, whose values are assigned to item values.

public string ValueMember { get; set; }

Property Value

string

Methods

GetItemsSource(object)

Gets the items of the list: ItemsSource when set; otherwise a new instance of the collection type, created with instance when it has a constructor taking it, or with its parameterless constructor.

Added in ATAS 8.0.15.

public IEnumerable GetItemsSource(object instance)

Parameters

instance object

The object whose setting is edited.

Returns

IEnumerable

The items; an empty sequence when the collection cannot be created.