ContentPropertyAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
(既定の) コンテンツ プロパティである型のプロパティを示します。
[System.AttributeUsage(System.AttributeTargets.Class, Inherited=true)]
public sealed class ContentPropertyAttribute : Attribute
type ContentPropertyAttribute = class
inherit Attribute
- 継承
-
ContentPropertyAttribute
- 属性
注釈
XAML プロセッサは、を使用してコンテンツプロパティを決定します。
ContentPropertyAttribute を使用して型を装飾すると、XAML 構文が短くなります。 As
ContentViewContentProperty 属性が適用されています。この XAML は有効です。
<ContentView>
<Label Text="Hello, Forms"/>
</ContentView>
これは、次の明示的な XAML に相当します。
<ContentView>
<ContentView.Content>
<Label Text="Hello, Forms"/>
</ContentView.Content>
</ContentView>
コンストラクター
| ContentPropertyAttribute(String) |
ContentPropertyAttribute クラスの新しいインスタンスを初期化します。 |
プロパティ
| Name |
コンテンツ プロパティの名前を取得します |