DescriptionViewer.Target Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the control that this DescriptionViewer is associated with.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data.Input (in System.Windows.Controls.Data.Input.dll)

Syntax

'Declaration
Public Property Target As FrameworkElement
public FrameworkElement Target { get; set; }
<sdk:DescriptionViewer Target="{Binding ElementName=targetElement}"/>

XAML Values

Property Value

Type: System.Windows.FrameworkElement
The control that this DescriptionViewer is associated with.

Remarks

Dependency property identifier field: TargetProperty

You associate a DescriptionViewer with another control by setting the Target property. The Target is a reference to a UIElement. You can set the Target in code or in XAML. To set it in XAML, you must use an ElementName binding.

When the Target property is set, a DescriptionViewer inspects each DependencyProperty on the Target control for a Binding. For each Binding that is found, it inspects the Source of the Binding for metadata. The metadata can be used to set the Description text and specify validation rules. If the Target control has more than one Binding, you can specify the one to retrieve metadata from by setting the PropertyPath property.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.