wx.ComponentModel.PropertyModel Class Reference

Inheritance diagram for wx.ComponentModel.PropertyModel:

wx.ComponentModel.DataModelBase wx.ComponentModel.IDataModel

List of all members.

Public Member Functions

 PropertyModel (string propertyName, IDataModel data)

Public Attributes

IDataModel Data
string PropertyName

Protected Member Functions

override object GetValue ()
override bool IsConsistentValue (object value)
override void SetValue (object value)


override bool PropagatesChanges [get]


struct  ObjectEventDescr

Detailed Description

A data model observing a certain property of a structured value of a data model.

Constructor & Destructor Documentation

wx.ComponentModel.PropertyModel.PropertyModel ( string  propertyName,
IDataModel  data 

Creates an instance encapsulating property propertyName of the value of data. If data does not have this property, this will be null.

This will look for an RaisesChangeEventAttribute of the property in the reference type if data to determine, whether this propagates all changes. So, this will fail to keep track of changes if the property or the RaisesChangeEventAttribute is not declared in the reference type of the data source.

Member Function Documentation

override object wx.ComponentModel.PropertyModel.GetValue (  )  [protected, virtual]

Reads property from the current data source value.

Implements wx.ComponentModel.DataModelBase.

override bool wx.ComponentModel.PropertyModel.IsConsistentValue ( object  value  )  [protected, virtual]

True iff value may be assigned by SetValue() without error. This is also allowed to throw an ErrorMessageException in order to provide full information for an error handler.

Implements wx.ComponentModel.DataModelBase.

override void wx.ComponentModel.PropertyModel.SetValue ( object  value  )  [protected, virtual]

Override this to change the represented value without propagation of dependencies. This MUST work without exceptions of IsConsistentValue() returns true.

Implements wx.ComponentModel.DataModelBase.

Member Data Documentation

IDataModel wx.ComponentModel.PropertyModel.Data

string wx.ComponentModel.PropertyModel.PropertyName

Property Documentation

override bool wx.ComponentModel.PropertyModel.PropagatesChanges [get]

True if the data source propagates changes and this listens to an event that indicates changes of the encapsulated property of the current value that can be read from the data source.

Reimplemented from wx.ComponentModel.DataModelBase.

Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads