MediaElement.Balance Property

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

Gets or sets a ratio of volume across stereo speakers.

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

Syntax

'Declaration
Public Property Balance As Double
public double Balance { get; set; }
<MediaElement Balance="double"  .../>

Property Value

Type: System.Double
The ratio of volume across speakers in the range between -1 and 1. The default value is 0.

Remarks

Dependency property identifier field: BalanceProperty

A value of -1 represents 100 percent volume in the speakers on the left, and a value of 1 represents 100 percent volume in the speakers on the right. 0 indicates that the volume is evenly distributed between left and right speakers.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 This property always returns 1 in Silverlight for Windows Phone.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

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