1

Windows Phone 7.1 シミュレーターでビデオを再生しようとしています。Windows phone で簡単なビデオ ファイルを再生するリンクや記事を提案できる人はいますか?

4

1 に答える 1

1
 <!xaml code in Main Page>
 <MediaElement Name="mediaElement" 
                      Source="xxxxxxxxxxxxxxxxxxxxxxx"
                      AutoPlay="False"
                      MediaOpened="OnMeenter code herediaElementMediaOpened"
                      MediaFailed="OnMediaElementMediaFailed"
                      CurrentStateChanged="OnMediaElementCurrentStateChanged"  />

  <!to play media by on click event>
  <shell:ApplicationBarIconButton
  IconUri="Images/appbar.transport.play.rest.png"
  Text="Play"
  Click="OnAppBarPlayClick" />


 <!this is based on click event>
 void OnAppbarPlayClick(object sender, EventArgs args)
 {
 mediaElement.Play();
 }


 //assign this code in main page

 public MainPage()
 {

 InitializeComponent();
 // Re-assign names already in the XAML file
 appbarPlayButton = this.ApplicationBar.Buttons[1] as ApplicationBarIconButton; 
 }
于 2012-10-26T09:46:13.953 に答える