使用全屏幕视图作为幻灯片幻灯片WPF [英] WPF slideshow using full screen views as slides

查看:336
本文介绍了使用全屏幕视图作为幻灯片幻灯片WPF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经被困在这一段时间现在根本不知道如何着手。我需要创建一个使用全屏幕视图(用户控件)作为幻灯片的幻灯片。我的意思是,我想通过滑动动画的方式全屏视图之间进行转换。

I've been stuck on this for a while now and simply don't know how to proceed. I need to create a slideshow using full screen views (UserControls) as slides. By this I mean that I want to transition between full screen views by means of a sliding animation.

的基本思想是定位一个视图关闭屏幕和当前显示视图的一侧,然后简单地滑动他们两个翻过。这与小图像运作良好,并有preSET大小的物体。

The basic idea is to position one view off screen and to the side of the currently displayed view and then to simply slide them both accross. This works well with small images and objects with a PRESET size.

这是我所发现的是获得在运行时每个视图的实际大小的问题。我需要这个值加到饲料中,负责移动视图的DoubleAnimation是。我怎样才能找出每个用户控件/视图ActualSize显示之前?

The problem that I have found is obtaining the actual size of each view at runtime. I need this value to feed to the DoubleAnimation that is responsible for moving the views. How can I find out the 'ActualSize' of each UserControl/view before they are displayed?

如果您有任何建议,我会很高兴听到他们的声音。提前很多感谢。

If you have any suggestions, I'd be glad to hear them. Many thanks in advance.

更新>>>

虽然第三方过渡code在大多数情况下运行良好,事实证明,我是有这个问题主要是由于WPF web浏览器控制。

While the third party transition code worked well for most situations, it turns out that the main problem that I was having was due to the WPF WebBrowser control.

显然,你不能创建一个视觉的VisualBrush 从它,因为它基本上是对的WinForms的包装控制。

Apparently, you cannot create a Visual for a VisualBrush from it because it is basically a wrapper for the WinForms control.

推荐答案

就个人而言,我会去喜欢的过渡性来处理实际的过渡。

Personally, I would go for a project like transitionals to handle the actual transition.

然后,你可以考虑提供您的用户控件的一些Viewboxed刷并显示全屏。马克rendle做了一项名为 code投影机他使用使Visual Studio的code窗口的外屏。该技术可以为你正在尝试什么是有用的。

Then you could consider rendering your usercontrol to some Viewboxed Brush and display that full screen. Mark rendle did a project called Code projector which he uses to render Visual Studio's code window to an external screen. That technique could be useful for what you are trying.

这篇关于使用全屏幕视图作为幻灯片幻灯片WPF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆