共用方式為


PropertyOrderAttribute 類別

更新:2007 年 11 月

這個屬性 (Attribute) 會附加至某個屬性 (Property),以指定屬性 (Property) 在屬性 (Property) 瀏覽器中的排序順序。

此 API 不符合 CLS 標準。 符合 CLS 標準的替代項目為 。

命名空間:  Microsoft.Windows.Design.PropertyEditing
組件:  Microsoft.Windows.Design (在 Microsoft.Windows.Design.dll 中)

語法

<AttributeUsageAttribute(AttributeTargets.Property)> _
<CLSCompliantAttribute(False)> _
Public NotInheritable Class PropertyOrderAttribute _
    Inherits Attribute

Dim instance As PropertyOrderAttribute
[AttributeUsageAttribute(AttributeTargets.Property)]
[CLSCompliantAttribute(false)]
public sealed class PropertyOrderAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Property)]
[CLSCompliantAttribute(false)]
public ref class PropertyOrderAttribute sealed : public Attribute
public final class PropertyOrderAttribute extends Attribute

備註

在屬性 (Property) 瀏覽器中會依照下列順序列出屬性 (Property):

  1. 依據分類。

  2. 依字母順序。

  3. PropertyOrder

您可以使用PropertyOrderAttribute 指定優先順序,進而控制屬性出現在屬性瀏覽器的位置。您可以指定在屬性瀏覽器中屬性應較早或較晚出現。而提供的標準優先順序可做為 PropertyOrder 類別的靜態屬性。標準優先順序為 EarlyLateDefault

此外,會指定 Default 優先順序給沒有特定優先順序的屬性。

如需如何使用屬性的詳細資訊,請參閱使用屬性擴充中繼資料

繼承階層架構

System.Object
  System.Attribute
    Microsoft.Windows.Design.PropertyEditing.PropertyOrderAttribute

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。

請參閱

參考

PropertyOrderAttribute 成員

Microsoft.Windows.Design.PropertyEditing 命名空間

CreateBefore

CreateAfter

其他資源

WPF 設計工具擴充性架構