小编Ret*_*Set的帖子

Windows Phone 8.1 MediaElement灾难性故障(HRESULT异常:0x8000FFFF(E_UNEXPECTED))

我一直有一个非常奇怪的问题,我无法解决这个问题.

我创建了非常简单的WP 8.1 App来显示问题:

MainPage.xaml中:

<Page
    x:Class="App6.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App6"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Grid>
        <MediaElement x:Name="MediaElement1" Source="/Assets/Audio/clap_01.mp3"
                      Visibility="Collapsed" AutoPlay="False" />

        <MediaElement x:Name="MediaElement2" Source="/Assets/Audio/click_01.mp3"
                      Visibility="Collapsed" AutoPlay="False" />

        <MediaElement x:Name="MediaElement3" Source="/Assets/Audio/cowbell_01.mp3"
                      Visibility="Collapsed" AutoPlay="False" />

        <MediaElement x:Name="MediaElement4" Source="/Assets/Audio/kick_01.mp3"
                      Visibility="Collapsed" AutoPlay="False" />

        <Button Content="Button" HorizontalAlignment="Left" Margin="125,118,0,0" VerticalAlignment="Top" Height="147"
                Width="150" Click="ButtonBase_OnClick" />


    </Grid>
</Page>
Run Code Online (Sandbox Code Playgroud)

MainPage.xaml.cs中:

namespace App6
{
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            this.NavigationCacheMode = NavigationCacheMode.Required;
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }

        private void …
Run Code Online (Sandbox Code Playgroud)

c# wpf xaml windows-phone windows-phone-8.1

6
推荐指数
1
解决办法
1181
查看次数

标签 统计

c# ×1

windows-phone ×1

windows-phone-8.1 ×1

wpf ×1

xaml ×1