过渡(即EntranceThemeTransition)在UWP中不起作用

问题描述 投票:0回答:1

我试图在按钮上应用EntranceThemeTransition但它似乎不起作用。我没有得到任何错误,应用程序运行良好,但没有过渡。

这是我的代码:

<Page
    x:Class="App9.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App9"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
  <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Button Content="Hello World" Click="Button_Click">
      <Button.Transitions>
        <TransitionCollection>
          <EntranceThemeTransition FromHorizontalOffset="100" IsStaggeringEnabled="True"/>
        </TransitionCollection>
      </Button.Transitions>
    </Button>
  </Grid>
</Page>

我已经尝试过qazxsw poi和qazxsw poi。但它仍然无效。

更新:以下代码适用于我的家用电脑。我试图重置VS2015中的所有设置但仍然无法正常工作。看起来有些东西搞砸了我的环境。我需要遇到同样问题的人的帮助。

windows xaml animation win-universal-app transitions
1个回答
0
投票

好吧,我知道答案。它不是Visual Studio,它位于系统设置中。我去了系统设置。

  1. 赢+ X.
  2. 单击系统
  3. 单击高级系统设置
  4. 在“高级”选项卡上,转到“性能”部分,然后单击“设置
  5. 检查“窗口内的动画控件和元素”
  6. 单击“应用”按钮

this

© www.soinside.com 2019 - 2024. All rights reserved.