XamlType.ContentProperty 屬性

定義

取得這個 XamlMember 之內容屬性的 XamlType 資訊。

C#
public System.Xaml.XamlMember ContentProperty { get; }

屬性值

XamlMember

這個 XamlMember 之內容屬性的 XamlType 資訊。 如果沒有內容屬性,則可以是 null

備註

使用 CLR 類型系統的系結或備份時,可以套用 ContentPropertyAttribute 至類型定義,在類型上指定 XAML 內容屬性。

這個屬性會對齊 [content property] [MS-XAML] 規格中的資訊專案。

如果您未針對 XamlType 使用預設的內部 CLR 反映技術,則對此屬性的呼叫可以在衍生類別上 XamlTypeLookupContentProperty 用覆寫。 如需傳回值和其他行為的詳細資訊,請參閱此類型的檔 LookupContentProperty

適用於

產品 版本
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7