dotnet / dotnet/wpf

Add CurrentState property to MediaElement

Open
#3,655 0 comments 17 reactions 0 assignees View on GitHub
API suggestion
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

There currently is no way of checking what [`MediaState`](https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.mediastate?view=netcore-3.1) a [`MediaElement`](https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.mediaelement?view=netcore-3.1) is in (without using reflection described [here](https://stackoverflow.com/a/16819598/5048754)).

A possible solution would be to add a `CurrentState` property to the `MediaElement` class, similar to the [CurrentState property](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.mediaelement.currentstate?view=winrt-19041#Windows_UI_Xaml_Controls_MediaElement_CurrentState) in UWP.

The specific use case I need it for is to check whether or not the `MediaElement` is currently paused.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.