Click or drag to resize
ValueBinderTModel, TControl, TValue Class
A layer above ControlBinder that takes care of the common chores involved in binding between a single property on a model that implements INotifyPropertyChanged and a single property on a control.
Inheritance Hierarchy
SystemObject
  VirtualRadar.WinForms.PortableBindingControlBinder
    VirtualRadar.WinForms.PortableBindingValueBinderTModel, TControl, TValue
      More...

Namespace: VirtualRadar.WinForms.PortableBinding
Assembly: VirtualRadar.WinForms (in VirtualRadar.WinForms.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public abstract class ValueBinder<TModel, TControl, TValue> : ControlBinder
where TModel : class, INotifyPropertyChanged
where TControl : Control

Type Parameters

TModel
TControl
TValue

The ValueBinderTModel, TControl, TValue type exposes the following members.

Constructors
  NameDescription
Public methodValueBinderTModel, TControl, TValue(TModel, TControl, ExpressionFuncTModel, TValue, ActionTModel, TValue)
Creates a new object.
Public methodValueBinderTModel, TControl, TValue(TModel, TControl, ExpressionFuncTModel, TValue, ActionTModel, TValue, FuncTControl, TValue, ActionTControl, TValue)
Creates a new object.
Top
Properties
  NameDescription
Public propertyControl
Gets the control.
Public propertyControlObject
Gets the control that has been bound to the model.
(Inherited from ControlBinder.)
Public propertyControlValue
Gets the control's value.
Public propertyControlValueObject
See base docs.
(Overrides ControlBinderControlValueObject.)
Public propertyInitialised
Gets a value indicating that the object has been initialised.
(Inherited from ControlBinder.)
Public propertyModel
Gets the model.
Public propertyModelObject
Gets the model that has been bound to the control.
(Inherited from ControlBinder.)
Public propertyModelPropertyName
Gets or sets the name of the model's property to bind to. Only required if the ctor getModelValue parameter does more than just return a property. Cannot be set once the binder has been initialised.
Public propertyModelValue
Gets the model's value.
Public propertyModelValueObject
See base docs.
(Overrides ControlBinderModelValueObject.)
Public propertyUpdateMode
Gets or sets an indication of when values are copied from the control to the model. Cannot be modified once the binder has been initialised.
(Inherited from ControlBinder.)
Top
Methods
  NameDescription
Protected methodChangeModelObject
Changes the model object.
(Inherited from ControlBinder.)
Public methodCopyControlToModel
Refreshes the model's content with the content of the control.
(Inherited from ControlBinder.)
Public methodCopyModelToControl
Refreshes the control's content with the content of the model.
(Inherited from ControlBinder.)
Public methodDispose
See interface docs.
(Inherited from ControlBinder.)
Protected methodDispose(Boolean)
Finalises or disposes of the object.
(Inherited from ControlBinder.)
Protected methodDoCopyControlToModel
Does the actual work of copying the value from the control to the model.
(Inherited from ControlBinder.)
Protected methodDoCopyModelToControl
Does the actual work of copying the value from the model to the control.
(Inherited from ControlBinder.)
Protected methodDoHookControl
Performs the actual work of hooking the control. Can be overridden.
(Inherited from ControlBinder.)
Protected methodDoHookControlPropertyChanged
Overridden to hook the control event that is raised as soon as the user changes the control's value.
(Inherited from ControlBinder.)
Protected methodDoHookModel
See base docs.
(Overrides ControlBinderDoHookModel.)
Protected methodDoInitialiseControl
Does the work of initialising the control. By default this just calls CopyModelToControl.
(Inherited from ControlBinder.)
Protected methodDoInitialising
See base docs.
(Overrides ControlBinderDoInitialising.)
Protected methodDoUnhookControl
Performs the actual work of unhooking the control. Can be overridden.
(Inherited from ControlBinder.)
Protected methodDoUnhookControlPropertyChanged
Overridden to unhook the control event that is raised as soon as the user changes the control's value.
(Inherited from ControlBinder.)
Protected methodDoUnhookModel
See base docs.
(Overrides ControlBinderDoUnhookModel.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Finalises the object.
(Inherited from ControlBinder.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodHookControl
Hooks the events on the control.
(Inherited from ControlBinder.)
Protected methodHookModel
Hooks the events on the model.
(Inherited from ControlBinder.)
Public methodInitialise
Initialises the binder. Must be called before the binder will start working.
(Inherited from ControlBinder.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodUnhookControl
Unhooks the events on the control.
(Inherited from ControlBinder.)
Protected methodUnhookModel
Unhooks the events on the model.
(Inherited from ControlBinder.)
Top
Fields
  NameDescription
Protected field_GetControlValue
Protected method that reads a control's current value.
Protected field_SetControlValue
Protected method that writes a control's current value.
Protected field_UpdatesLocked
True if changes are not to be copied between the control and the model.
(Inherited from ControlBinder.)
Top
See Also
Inheritance Hierarchy
SystemObject
  VirtualRadar.WinForms.PortableBindingControlBinder
    VirtualRadar.WinForms.PortableBindingValueBinderTModel, TControl, TValue
      VirtualRadar.WinForms.PortableBindingCheckBoxBoolBinderTModel
      VirtualRadar.WinForms.PortableBindingFileNameStringBinderTModel
      VirtualRadar.WinForms.PortableBindingFolderStringBinderTModel
      VirtualRadar.WinForms.PortableBindingLabelStringBinderTModel
      VirtualRadar.WinForms.PortableBindingLinkLabelStringBinderTModel
      VirtualRadar.WinForms.PortableBindingNumericDoubleBinderTModel
      VirtualRadar.WinForms.PortableBindingNumericIntBinderTModel
      VirtualRadar.WinForms.PortableBindingRadioButtonEnumBinderTModel, TValue
      VirtualRadar.WinForms.PortableBindingTextBoxStringBinderTModel
      VirtualRadar.WinForms.PortableBindingValueFromListBinderTModel, TControl, TValue, TListModel