PropertyValue 類別

定義

維護屬性方格中屬性值的資料模型。Maintains a data model for the value of a property in the property grid.

public ref class PropertyValue abstract : System::ComponentModel::INotifyPropertyChanged
public abstract class PropertyValue : System.ComponentModel.INotifyPropertyChanged
type PropertyValue = class
    interface INotifyPropertyChanged
Public MustInherit Class PropertyValue
Implements INotifyPropertyChanged
繼承
PropertyValue
實作

建構函式

PropertyValue(PropertyEntry)

使用設定為指定之 PropertyValue 物件的父屬性,初始化 PropertyEntry 類別的新執行個體。Initializes a new instance of the PropertyValue class with the parent property set to a specified PropertyEntry object.

屬性

CanConvertFromString

在衍生類別內實作時,取得值,此值指出是否可以從字串轉換 ValueWhen implemented in a derived class, gets a value that indicates whether Value can be converted from a string.

CatchExceptions

取得值,指出應該攔截屬性值取得和設定期間擲回的例外狀況,還是應該直接傳播到呼叫端。Gets a value that indicates whether exceptions thrown during property value getting and setting should be caught or should be propagated directly to the caller.

Collection

在衍生類別內實作時,取得 PropertyValue 執行個體的集合,當 IsCollection 確認此屬性為集合時,這些執行個體會對應到集合中的項目。When implemented in a derived class, gets a collection of PropertyValue instances that correspond to items in a collection when IsCollection verifies that the property is a collection.

HasSubProperties

在衍生類別內實作時,取得一個值,這個值指出此屬性的型別是否支援子屬性。When implemented in a derived class, gets a value that indicates whether the type of this property supports sub-properties.

IsCollection

在衍生類別內實作時,取得一個值,這個值指出此 PropertyValue 是否為集合。When implemented in a derived class, gets a value that indicates whether this PropertyValue is a collection.

IsDefaultValue

在衍生類別內實作時,取得一個值,這個值指出 Value 是否為屬性的預設值。When implemented in a derived class, gets a value that indicates whether the Value is the default value for the property.

IsMixedValue

在衍生類別內實作時,取得一個值,這個旗標會指出是否有多個物件包含此屬性並擁有不同的值。When implemented in a derived class, gets a value that indicates whether multiple objects contain this property and have different values.

ParentProperty

在主機環境下進行屬性實作時,取得父代 PropertyEntryGets the parent PropertyEntry when the property implementation occurs in a host environment.

Source

在衍生類別內實作時,取得包含此屬性值來源之相關資訊的 PropertyValueSource 物件。When implemented in a derived class, gets a PropertyValueSource object that contains information about where this property value is coming from.

StringValue

取得或設定 Value 做為 StringGets or sets a Value as a String.

SubProperties

在衍生類別內實作時,取得子屬性的集合,做為 PropertyEntry 執行個體。When implemented in a derived class, gets a collection of sub-properties as PropertyEntry instances.

Value

在基礎屬性資料集合中,取得或設定屬性值。Gets or sets a property value in the underlying collection of property data.

方法

ClearValue()

在衍生類別內實作時,清除 PropertyValue 使其取消設定。When implemented in a derived class, clears the PropertyValue so that it is unset.

ConvertStringToValue(String)

在衍生類別內實作時,將指定的 StringValue 轉換為 ValueWhen implemented in a derived class, converts the specified StringValue to a Value.

ConvertValueToString(Object)

在衍生類別內實作時,將指定的 Value 轉換為 StringValueWhen implemented in a derived class, converts the specified Value to a StringValue.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
GetValueCore()

在衍生類別內實作時,傳回 ValueWhen implemented in a derived class, returns a Value.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
NotifyRootValueChanged()

當基礎值型別在外部 (例如在設計介面上) 變更時,引發 RootValueChanged 事件。Raises the RootValueChanged event when the underlying value type is changed externally, as on the design surface.

NotifySubPropertyChanged()

當此屬性的其中一個子屬性變更時,引發 SubPropertyChanged 事件。Raises the SubPropertyChanged event when one of the sub-properties of this property has changed.

OnPropertyChanged(PropertyChangedEventArgs)

使用指定的 PropertyChanged 物件,引發 PropertyChangedEventArgs 事件。Raises the PropertyChanged event with the specified PropertyChangedEventArgs objects.

OnPropertyChanged(String)

引發 PropertyChanged 事件,這個事件會使用所變更之屬性的名稱。Raises the PropertyChanged event that uses the name of the property that changed.

OnPropertyValueException(PropertyValueExceptionEventArgs)

PropertyValueException 屬性在基礎資料集合中取得或設定值失敗時,引發 PropertyValue 事件的預設實作。Default implementation that raises the PropertyValueException event when PropertyValue properties experience failure getting or setting values in the underlying collection of data.

SetValueCore(Object)

在衍生類別內實作時,設定 ValueWhen implemented in a derived class, sets the Value.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
ValidateValue(Object)

在衍生類別內實作時,如果指定之值物件的驗證顯示為無效,則擲回例外狀況。When implemented in a derived class, throws an exception if verification of the specified value object shows it to be invalid.

事件

PropertyChanged

PropertyValue 物件的屬性或子屬性已變更時發生。Occurs when properties or sub-properties of the PropertyValue object has changed.

PropertyValueException

主機實作針對錯誤處理所使用的事件。Event used by host implementations for error handling.

RootValueChanged

ValueStringValue 屬性因為變更 PropertyValue 值而更新時發生。Occurs when the Value or StringValue property is updated as a result of the PropertyValue value being changed.

SubPropertyChanged

當子屬性因為 PropertyValue 有所變更而更新時發生。Occurs when sub-properties are updated as a result of the PropertyValue being changed.

適用於