如何在DataContex变更时进行转换?
我有一个简单的 wp7 应用程序,有 3 个页面。我已经使页面过渡正常工作(使用 TransitionService 的内置过渡(幻灯片、旋转滚动...),如 这个简单的教程。在我的手机页面之一上,我绑定了几个不同的 ViewModel(只有一个可见)。另外,我有一个可以更改 DataContex (可见 ViewModel)的按钮,我想要做的就是在 DataContex 更改上输入某种转换(就像我在手机页面导航上所做的那样)。用户正在其他页面上导航。 我很感激任何建议。
I have a simple wp7 app with 3 pages. I've made page transition to work (with built-in transitions from TransitionService (slide, rotate roll...) as shown in this simple tutorial. On one of my phone page, I bind few different ViewModels (only one is visible). Also, there I have a button which change DataContex (visible ViewModel). All of that work perfectly. What I want to do is to input somekind of transition on DataContex change (as I have on phone page navigation), so it would appear that the user is navigating on other page.
I appreciate any advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Christian Schormann 在他的 Mix 演讲 CL02 中演示了如何创建页面转换。下载高分辨率格式的视频并在本地播放将使其易于理解。
或者,您可以使用 11 月 Windows Phone 工具包附带的 Transition 控件来为您完成这项工作。这里更详细地讨论。
Windows Phone 7 的过渡 - Will 的博客
Christian Schormann demos creating page transitions in his Mix talk CL02. Download the video in high res format and play it locally will make it easy to follow.
Alternatively, you could make use of the Transition control packaged with the November Windows Phone Toolkit to do this work for you. Discussed in more detail here.
Transitions for Windows Phone 7 - Will's Blog
根据您想要制作动画的内容,您可以使用
故事板
。Depending on what you want to animate you could look at using a
StoryBoard
.