Freigeben über


MediaElement.BufferingTime Property

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

Gets or sets the amount of time to buffer.

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

Syntax

'Declaration
Public Property BufferingTime As TimeSpan
public TimeSpan BufferingTime { get; set; }
<MediaElement BufferingTime="[days.]hours:minutes:seconds[fractionalSeconds]"/>

XAML Values

  • days
    Optional. An integer value greater than or equal to 0 that specifies the number of days.

  • hours
    Required, even if 0. An integer value between 0 and 23 that specifies the number of hours.

  • minutes
    Optional if only hours are desired, but needs to be at least set to 0 if you intend to set a seconds value. A value between 0 and 59 that specifies the number of minutes.

  • seconds
    Optional if only hours/minutes are desired. An integer value between 0 and 59 that specifies the number of seconds.

  • fractionalSeconds
    Optional. A floating point value between 0 and 1 consisting of 1 to 7 digits that specifies fractional seconds.

  • In the grammar, [] indicates optional values, the [] are not literals. The : (colon) character is a literal, and delimits the h:m:s string form of a common timespan, or the optional days and fractionalSeconds values.

  • The required and optional aspects of these parts of a timespan reflect the consideration that without at least 0 values, the string conversion cannot know what part of the h:m:s portion of the timespan you intend to set.

Property Value

Type: System.TimeSpan
The amount of time to buffer. The default value is a TimeSpan with value of 5 seconds (0:0:05).

Remarks

Dependency property identifier field: BufferingTimeProperty

For Silverlight for Windows Phone, the value of BufferingTime has no effect on VC-1 content.

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.