C# 클래스 Open.Core.UI.Controls.ComboBoxViewModel

Provides a simple logical representation of a ComboBox.
For simple binding, set this as the DataContext of a CoreComboBox.
상속: ViewModelBase
파일 보기 프로젝트 열기: philcockfield/Open.TestHarness.SL 1 사용 예제들

공개 메소드들

메소드 설명
Add ( string text, object value ) : ComboBoxItemViewModel

Adds a new item to the combo-box.

ComboBoxViewModel ( ) : System
Select ( int index ) : void

Sets the element at the specified index as the currently SelectedItem.

This method sets the SelectedItem to null if the 'index' is outside the range of 'Items'.

SelectFirst ( ) : void

Sets the first item in the collection as the currently SelectedItem.

SelectLast ( ) : void

Sets the last item in the collection as the currently SelectedItem.

SelectValue ( object value ) : void

Selects the item with the specified value (of sets the SelectedItem to null if the value does not exist within the 'Items' collection).

비공개 메소드들

메소드 설명
OnSelectionChanged ( ) : void

메소드 상세

Add() 공개 메소드

Adds a new item to the combo-box.
public Add ( string text, object value ) : ComboBoxItemViewModel
text string The display text of the item.
value object The value for the item.
리턴 ComboBoxItemViewModel

ComboBoxViewModel() 공개 메소드

public ComboBoxViewModel ( ) : System
리턴 System

Select() 공개 메소드

Sets the element at the specified index as the currently SelectedItem.
This method sets the SelectedItem to null if the 'index' is outside the range of 'Items'.
public Select ( int index ) : void
index int The index of the item to select.
리턴 void

SelectFirst() 공개 메소드

Sets the first item in the collection as the currently SelectedItem.
public SelectFirst ( ) : void
리턴 void

SelectLast() 공개 메소드

Sets the last item in the collection as the currently SelectedItem.
public SelectLast ( ) : void
리턴 void

SelectValue() 공개 메소드

Selects the item with the specified value (of sets the SelectedItem to null if the value does not exist within the 'Items' collection).
public SelectValue ( object value ) : void
value object The value to select.
리턴 void