2011-08-11 37 views
1

如何創建在WP7音頻播放器的全球搜索欄?我想創建這樣的http://fastandroid.ru/wp-content/uploads/2011/07/vkontakte-amberfog_4.png全球搜索欄的MediaElement WP7

+0

你有問題嗎? – AnthonyWJones

+0

我怎麼能意識到這一點?我要求甚至意識到這一點,而不是代碼。首先我添加'var _pop = new Popup {Child = mediaelelement,IsOpen = true};'我可以在所有頁面上播放音頻 – SevenDays

回答

0

添加必要的控制應用框架,而不是一個/每一頁。

在App.xaml中添加如下內容:

<Application.RootVisual> 
    <phone:PhoneApplicationFrame x:Name="RootFrame" 
      Navigated="CompleteInitializePhoneApplication" 
      NavigationFailed="RootFrame_NavigationFailed"> 
     <phone:PhoneApplicationFrame.Template> 
      <ControlTemplate> 
       <Grid> 
        <Grid.RowDefinitions> 
         <RowDefinition Height="700"/> 
         <RowDefinition Height="100"/> 
        </Grid.RowDefinitions> 
        <Grid Grid.Row="0" x:Name="ClientArea"> 
         <ContentPresenter /> 
        </Grid> 

        <Grid Grid.Row="0"> 
         // your controls here 
        </Grid> 
       </Grid> 
      </ControlTemplate> 
     </phone:PhoneApplicationFrame.Template> 
    </phone:PhoneApplicationFrame> 
</Application.RootVisual> 
+0

我需要在App.xaml.cs中完成它? 請給我正確的方向,我可以找到有關它的材料。 – SevenDays

+0

@wsevendays。在app.xaml中執行它將是最簡單的。查看更新的回答 –

+1

我無法得到它的作品。 http://www.youtube.com/watch?v=6j0Vu0mvrNo ...' <網格Grid.Row = 「0」> <按鈕內容= 「你好」 HEIGHT =「100 「Width =」300「/> '...... – SevenDays