ContentPropertyAttribute Clase
Definición
Indica la propiedad del tipo que es la propiedad de contenido (predeterminada).Indicates the property of the type that is the (default) content property.
[System.AttributeUsage]
public sealed class ContentPropertyAttribute : Attribute
type ContentPropertyAttribute = class
inherit Attribute
- Herencia
-
ContentPropertyAttribute
- Atributos
Comentarios
El procesador XAML usa para determinar la propiedad de contenido.XAML processor uses to determine the content property.
Los tipos decorativos con ContentPropertyAttribute permiten una sintaxis XAML más corta.Decorating types with ContentPropertyAttribute allows shorter XAML syntax. AsAs
ContentView tiene aplicado un atributo ContentProperty, este código XAML es válido:
ContentView has a ContentProperty attribute applied, this XAML is valid:
<ContentView>
<Label Text="Hello, Forms"/>
</ContentView>
Es equivalente al siguiente código XAML más explícitoThis is equivalent to the following, more explicit XAML
<ContentView>
<ContentView.Content>
<Label Text="Hello, Forms"/>
</ContentView.Content>
</ContentView>
Constructores
ContentPropertyAttribute(String) |
Inicializa una nueva instancia de la clase ContentPropertyAttribute.Initializes a new instance of the ContentPropertyAttribute class. |
Propiedades
Name |
Obtiene el nombre de la propiedad de contenidoGets the name of the content property |