小编And*_*rov的帖子

Windows 8 Store App平滑方向更改

我有以下问题:

当我将c#+ xaml页面的方向从横向更改为纵向或反之亦然时,用户可以在重新计算和重新呈现布局之前在屏幕上看到大的蓝色部分.这些斑点看起来像是前一个定位状态的残羹剩饭.

我正在寻找一种方法来隐藏或平滑这种极其粗糙和颠簸的过渡.

我尝试使用ProgressRing添加一个方向更改处理程序来覆盖它1秒钟,但它没有帮助 - 处理程序在蓝点之后执行.这是我的动画StoryBoard的代码

 <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
            <VisualState x:Name="FullScreenPortrait">
                <Storyboard>
                    <!-- Change the back button and the logo -->
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="headerLogoImage" Storyboard.TargetProperty="Width">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="430"/>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="headerLogoImage" Storyboard.TargetProperty="Height">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="49"/>
                    </ObjectAnimationUsingKeyFrames>

                    <!--Change section title and navButtons to be in two rows, by moving navButtons to the second row, first column-->
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="navButtons" Storyboard.TargetProperty="(Grid.Row)">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                    </ObjectAnimationUsingKeyFrames> …
Run Code Online (Sandbox Code Playgroud)

c# xaml orientation windows-8 windows-store-apps

5
推荐指数
1
解决办法
1053
查看次数

标签 统计

c# ×1

orientation ×1

windows-8 ×1

windows-store-apps ×1

xaml ×1