[UWP] - 显示转换,例如当View变为可见时,EntranceThemeTransition [英] [UWP] - Show transition e.g. EntranceThemeTransition when View becomes Visible
问题描述
您好,
我在页面中有一个以Visibility = Collapsed开头的视图。我想使用其中一个内置转换,例如EntranceThemeTransition在该视图变为可见时为其设置动画。这可能吗?
谢谢
Hello bjames_dev,
No EntranceThemeTransition不符合您的要求。请在此处查看官方文档:
https: //docs.microsoft.com/en-us/windows/uwp/graphics/animations-overview
您将阅读以下内容:
" EntranceThemeTransition 表示可以应用于内容的动议首先加载页面或大部分UI。因此,内容的第一次出现可以
提供与内容更改不同的反馈。
EntranceThemeTransition 相当于
NavigationThemeTransition 使用默认参数,但可以在
之外使用 框架 。"
它仅在首次加载UI时有效。因此,如果你想使用EntranceThemeTransition,你必须删除/添加UI,这样它才会显示效果。
祝你好运,
百里
Hello,
I have a View within a Page that begins with Visibility=Collapsed. I would like to use one of the in-built transitions e.g. EntranceThemeTransition to animate this view when it becomes visible. Is this possible?
Thanks
Hello bjames_dev,
No EntranceThemeTransition does not meet your requirement. Please check the official doc here:
https://docs.microsoft.com/en-us/windows/uwp/graphics/animations-overview
You will read the following:
"EntranceThemeTransition represents a motion that can apply to content when a page or large section of UI is first loaded. Thus the first appearance of content can offer different feedback than a change to content does. EntranceThemeTransition is equivalent to a NavigationThemeTransition with the default parameters, but may be used outside of a Frame."
It only works when your UI is first loaded. So if you want to work with EntranceThemeTransition, you have to delete/add the UI so it will show you the effect.
Best regards,
Barry
这篇关于[UWP] - 显示转换,例如当View变为可见时,EntranceThemeTransition的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!