Choice Class
Defines a list of exclusive options that the application can work with. The application can use an index or access options by advancing through them in either direction.
public class Choice : ModelItem, IValueRange, IModelItem, IPropertyObject, IModelItemOwner
Public Instance Constructors
Constructor | Description |
Choice()
Choice(IModelItemOwner) |
Initializes a new instance of the Choice class. |
Choice(IModelItemOwner, string) | Initializes a new instance of the Choice class. |
Choice(IModelItemOwner, string, IList) | Initializes a new instance of the Choice class. |
Public Instance Methods
Method | Description |
DefaultValue | Changes the selected option to the default item. |
NextValue | Changes the selected option to the next one in the Options list. |
PreviousValue | Changes the selected option to the previous one in the Options list. |
Protected Instance Methods
Method | Description |
GetIndexOfOption | Gets the index of the selected option in the Options array. |
OnChosenChanged | Notifies derived classes when the selected option has changed. |
ValidateOptionList | Verifies that the given Options list is acceptable for this Choice object. |
Public Instance Properties
Property | Description |
Chosen | Gets or sets the object that is selected from the Options list. |
ChosenIndex | Gets or sets the index of the object that is selected from the Options list. |
Default | Gets or sets the default object within the Options list. |
DefaultIndex | Gets or sets the index of the default object within the Options list. |
HasNextValue | Determines whether a call to the NextValue method will succeed. |
HasPreviousValue | Determines whether a call to the PreviousValue method will succeed. |
Options | Gets or sets the list of Options. |
Wrap | Gets or sets a value that indicates whether the list should wrap when the PreviousValue or NextValue methods are called at the beginning or end of the list. |
Public Instance Events
Event | Description |
ChosenChanged | Raised when the chosen item has changed. |
Remarks
Only one item can be chosen at a time. A typical user interface element for this object is a radio group or a spinner control.
Requirements
Reference: Microsoft.MediaCenter.UI
Namespace: Microsoft.MediaCenter.UI
Assembly: Microsoft.MediaCenter.UI.dll
Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later
See Also