VideoBrush.SetSource Method (MediaElement) (System.Windows.Media)

Switch View :
ScriptFree
.NET Framework Class Library for Silverlight
VideoBrush.SetSource Method (MediaElement)

Sets the source of the VideoBrush using a media file source from an intermediary MediaElement control.

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

Visual Basic (Declaration)
Public Sub SetSource ( _
	source As MediaElement _
)
C#
public void SetSource(
	MediaElement source
)

Parameters

source
Type: System.Windows.Controls.MediaElement
The intermediary MediaElement control used as the source for the VideoBrush.
Remarks

You typically use SetSource rather than SourceName for cases where the MediaElement source is not already declared in markup and is instead instantiated in runtime code.

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.

See Also

Reference