Exportar (0) Imprimir
Expandir todo

ContentControl.Content (Propiedad)

Gets or sets the content of a ContentControl. This is a dependency property.

Espacio de nombres: System.Windows.Controls
Ensamblado: PresentationFramework (en presentationframework.dll)
Espacio de nombres XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[BindableAttribute(true)] 
public Object Content { get; set; }
/** @property */
public final Object get_Content ()

/** @property */
public final void set_Content (Object value)

public final function get Content () : Object

public final function set Content (value : Object)

<object> content</object>
 Content  Text or a single UIElement. 

Valor de propiedad

An object that contains the control's content. The default value is referencia null (Nothing en Visual Basic).

Identifier field

ContentProperty

Metadata properties set to true

None

Content Model: This property is used to set the content of controls that inherit from ContentControl. For more information, see the Content Control Content Model.

The following examples show how to add content to a Button using the Content property that button inherits.

void OnClick5(object sender, RoutedEventArgs e)
{
    btn6.FontSize = 16;
    btn6.Content = "This is my favorite photo.";
    btn6.Background = Brushes.Red;
}

Microsoft .NET Framework 3.0 es compatible con Windows Vista, Microsoft Windows XP SP2 y Windows Server 2003 SP1.

.NET Framework

Compatible con: 3.0

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft