【发布时间】:2015-02-19 18:07:56
【问题描述】:
<StackPanel>
<MediaElement x:Name="UnMediaElement"
Height="10"
Width="10"
Source="/Assets/sounds/unu.wav"
AutoPlay="False" />
<Button x:Name="play1SoundButton"
Height="80"
Width="200"
HorizontalAlignment="Left"
Content="Play Sound"
Click="play1SoundButton_Click" />
</StackPanel>
我有 2 个按钮。当我按下button1时,它会播放声音。当我按下按钮 2 时,我希望声音停止并重新启动到 0。现在,如果我按按钮 1,然后按 2,然后再按按钮 1,它会恢复。另外,我不想在播放的同时播放另一种声音。
【问题讨论】:
标签: xaml visual-studio-2012 windows-phone-8 visual-studio-2013