如何修复 "MediaElement doesn't contain definition for CurrentState"

How to fix "MediaElement doesn't contain definition for CurrentState"

我试图实现找到的代码 on,但那行不通。

我的代码是:mediaStateTextBlock.Text = m.CurrentState.ToString();

它说 MediaElement 不包含 CurrentState

的定义

谁能告诉我问题出在哪里?

更新: 还是问题没有解决。

添加对 Windows.UI.Xaml.Controls.dll, Windows.dll 个 DLL 的引用