有人知道,为什么在全窗口模式下双击事件不会在MediaElement上触发?很简单,当在FullWindow中双击事件不会触发! Windows 10 Universal App!
private void MediaElement_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
{
mediaElement.IsFullWindow = !mediaElement.IsFullWindow;
}
答案 0 :(得分:2)
好的找到了一种方法来代替mediaelement.DoubleTapped使用
来完成这项工作 mediaElement.TransportControls.DoubleTapped += TransportControls_DoubleTapped;
private void TransportControls_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e)
{
mediaElement.IsFullWindow = !mediaElement.IsFullWindow;
}
但是有一个问题,你可以双击控件,它会工作!