UserControl.Content property

Applies to Windows and Windows Phone

Gets or sets the content that is contained within a user control.

Syntax


public UIElement Content { get; set; }


<UserControl ...>
  singleContentElement
</UserControl>
-or-
<UserControl .../>

XAML Values

singleContentElement

Exactly one object element for a class that derives from UIElement. This is almost always an object that can take child elements (such as a Panel) so that multiple elements can be added to content. XAML processing of a UserControl has a special behavior that sets this content to the otherwise protected Content property.

Property value

Type: UIElement

The content of the user control.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

UserControl

 

 

Show:
© 2014 Microsoft