StateElement.Item Property
Gets and sets values on the state.
Namespace: Microsoft.Practices.CompositeUI
Assembly: Microsoft.Practices.CompositeUI (in microsoft.practices.compositeui.dll)
Syntax
'Declaration
Protected Default Property Item ( _
key As String _
) As Object
'Usage
Dim key As String
Dim value As Object
value = Me(key)
Me(key) = value
protected Object this [
string key
] { get; set; }
protected:
property Object^ default [String^] {
Object^ get (String^ key);
void set (String^ key, Object^ value);
}
/** @property */
protected Object get_Item (String key)
/** @property */
protected void set_Item (String key, Object value)
JScript supports the use of indexed properties, but not the declaration of new ones.
Parameters
- key
Remarks
Derived classes must use this accessor in order to get the StateChanged fired. This is made protected to force that pattern for strongly typed models, and forbid access to the generic dictionary in those cases (unless the developer explicitly exposes a public indexer as the State class does).
See Also
Reference
StateElement Class
StateElement Members
Microsoft.Practices.CompositeUI Namespace