Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xaml 如何从Windows 8应用程序中的单个对象中删除EnterthemeTransition?_Xaml_User Interface_Windows 8_Microsoft Metro_Winrt Xaml - Fatal编程技术网

Xaml 如何从Windows 8应用程序中的单个对象中删除EnterthemeTransition?

Xaml 如何从Windows 8应用程序中的单个对象中删除EnterthemeTransition?,xaml,user-interface,windows-8,microsoft-metro,winrt-xaml,Xaml,User Interface,Windows 8,Microsoft Metro,Winrt Xaml,在Windows8应用程序中,似乎每个添加到页面中的对象都会获得“从右向左滑动”的入口过渡,每当有人导航到该页面时,该过渡就会开始 是否有可能从此过渡中删除单个对象 都不是 <Object.Transitions> <TransitionCollection /> </Object.Transitions> 也没有帮助 有什么想法吗?AFAIK没有办法使给定对象不受其父对象应用的转换的影响。我唯一能建议的是以一种不应用转换的方式构造xaml。

在Windows8应用程序中,似乎每个添加到页面中的对象都会获得“从右向左滑动”的入口过渡,每当有人导航到该页面时,该过渡就会开始

是否有可能从此过渡中删除单个对象

都不是

<Object.Transitions>
      <TransitionCollection />
</Object.Transitions>

也没有帮助


有什么想法吗?

AFAIK没有办法使给定对象不受其父对象应用的转换的影响。我唯一能建议的是以一种不应用转换的方式构造xaml。我的意思是,在没有子转换的面板中有这个特殊项,而页面的其余部分在有子转换的面板中。根据此项所在的位置,它可能非常简单,也可能非常困难。

正如我所建议的,我找到的唯一解决方案是更改页面结构,并将元素从具有动画的网格中删除:

<Page
    x:Class="App1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App1"
    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}">
        <Grid.Transitions>
            <TransitionCollection/>
            <!-- Ensure no transitions in background -->
        </Grid.Transitions>

        <TextBlock FontSize="50" Margin="50">This item is not animated</TextBlock>
        <Grid>
            <Grid.ChildrenTransitions>
                <TransitionCollection>
                    <!-- add transitions here -->
                    <EntranceThemeTransition FromVerticalOffset="1500" FromHorizontalOffset="1500"/>
                </TransitionCollection>
            </Grid.ChildrenTransitions>
            <TextBlock Margin="50,100" FontSize="50">This item is animated</TextBlock>
        </Grid>
        <TextBlock FontSize="50" Margin="50,150">Another not animated item</TextBlock>
    </Grid>
</Page>

此项目未设置动画
此项目已设置动画
另一个未设置动画的项目