Freigeben über


VideoBrush.SourceName Property

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

Gets or sets the name of the MediaElement to use as the source of the VideoBrush.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Property SourceName As String
public string SourceName { get; set; }
<VideoBrush SourceName="mediaElementname"/>

Property Value

Type: System.String
The name of the MediaElement to use as the source of the VideoBrush.

Remarks

Dependency property identifier field: SourceNameProperty

The name is the Name or x:Name of a MediaElement as defined in XAML markup. To set the SourceName value in code at run time, make sure to get the Name property of the MediaElement rather than attempting to set to a MediaElement instance. Note that the Name of the MediaElement must already be defined in initial XAML; declaring a Name at run-time does not retroactively make the name available to XAML usages that attempt to refer to that name.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

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