如何在 Windows Phone 中创建类似应用栏的从下到上的滑动菜单

How to create bottom to top slide menu like app bar in Windows Phone

您好,我需要创建一个自定义的从底部到顶部的滑动菜单...类似于 Windows Phone 中的应用栏。我怎样才能做到这一点。请问有什么要开始的吗?

UI 看起来像图像 below:When 用户滑动按钮面板底部面板的状态应该从 1 变为 2....这与应用程序栏非常相似,但我需要在其中添加自定义控件...

    <Grid Name="GridDemo">

        <Grid.Triggers>
            <EventTrigger RoutedEvent="MouseEnter">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation 
                        Storyboard.TargetName="ControlsGrid" 
                        Storyboard.TargetProperty="(Grid.Height)"
                        From="0" 
                        To="66" 
                        Duration="0:0:0.5" />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
            <EventTrigger RoutedEvent="MouseLeave">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation 
                        Storyboard.TargetName="ControlsGrid"
                        Storyboard.TargetProperty="(Grid.Height)"
                        From="66" 
                        To="0" 
                        Duration="0:0:0.5" />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Grid.Triggers>

        <!-- 
        This is a sample content to demostrate animation;
        Without it 'GridDemo' will be collapsed.
    -->


        <Grid Margin="0" Name="ControlsGrid" VerticalAlignment="Bottom" Background="Black" />
    </Grid>

</Window>

从头开始开发视图转换绝非易事,但幸运的是,有预先编写的库可以为我们完成这项工作。迄今为止我发现的最好的称为 Transitionals。您可以从 CodePlex 的 Transitionals 页面下载 dll。

我已经能够通过操纵翻译效果来解决这个问题。如此处示例所示 http://blog.scottlogic.com/2012/06/06/a-gesture-driven-windows-phone-to-do-application.html?utm_source=tuicool