Table of Contents

Class ObjectPropertyItem<T>

Namespace
H.Controls.Form.PropertyItems.Base
Assembly
H.Controls.Form.dll
public class ObjectPropertyItem<T> : BindingVisiblablePropertyItemBase, INotifyPropertyChanged, IDisplayBindable, IIconable, INameable, IOrderable, IGroupable, IDable, IDescriptionable, IPropertyItem, IValueChangeable, IBindingVisibleable, IRefreshOnValueChanged, IDataErrorInfo, IDisposable

Type Parameters

T
Inheritance
ObjectPropertyItem<T>
Implements
Derived
Inherited Members
Extension Methods

Constructors

ObjectPropertyItem(PropertyInfo, object)

public ObjectPropertyItem(PropertyInfo property, object obj)

Parameters

property PropertyInfo
obj object

Properties

Error

Gets an error message indicating what is wrong with this object.

public string Error { get; }

Property Value

string

An error message indicating what is wrong with this object. The default is an empty string ("").

Flag

public string Flag { get; set; }

Property Value

string

this[string]

Gets the error message for the property with the given name.

public string this[string columnName] { get; }

Parameters

columnName string

The name of the property whose error message to get.

Property Value

string

The error message for the property. The default is an empty string ("").

Message

说明

public string Message { get; set; }

Property Value

string

Value

说明

[Browsable(false)]
public virtual T Value { get; set; }

Property Value

T

Methods

AddValueChanged()

public void AddValueChanged()

CheckType(T, out string)

验证数据类型是否合法

protected virtual bool CheckType(T value, out string error)

Parameters

value T
error string

Returns

bool

DependencyProperty_ValueChanged(object, EventArgs)

public void DependencyProperty_ValueChanged(object sender, EventArgs e)

Parameters

sender object
e EventArgs

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetValue()

protected virtual T GetValue()

Returns

T

GetValue<R>()

protected R GetValue<R>()

Returns

R

Type Parameters

R

LoadValue()

从实体中加载数据到页面

public override void LoadValue()

OnValueChanged(T, T)

protected virtual void OnValueChanged(T o, T n)

Parameters

o T
n T

RemoveValueChanged()

public void RemoveValueChanged()

SetValue(T)

protected virtual void SetValue(T value)

Parameters

value T