全球搜索栏MediaElement wp7

时间:2011-08-11 02:30:48

标签: c# silverlight windows-phone-7 mediaelement seekbar

如何在WP7中为音频播放器创建全局搜索栏?我想创建类似这样的内容http://fastandroid.ru/wp-content/uploads/2011/07/vkontakte-amberfog_4.png

1 个答案:

答案 0 :(得分: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>