UIElement.Projection只在Silverlight,而不是在WPF? [英] UIElement.Projection only in Silverlight and not in WPF?

查看:166
本文介绍了UIElement.Projection只在Silverlight,而不是在WPF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了一个样本code从这里开始: HTTP://gallery.ex$p$pssion.microsoft.com/ShowHideWithFlip

现在我的问题是,我使用WPF的家伙是使用Silverlight。

我还以为他们都使用.NET 4,但我发现有.NET 4,并有.NET Silverlight的totla指出错误的东西..

我得到这个错误:

 System.Windows.UIElement'不包含'投射',没有扩展方法'投射'接受第一种类型System.Windows.UIElement的说法可能是一个定义(是否缺少using指令或程序集引用?)
 

我刚刚找到了原因,那家伙正在使用.NET的Silverlight和我使用.NET 4。

Silverlight的: 的http://msdn.microsoft.com/en-us/library/system.windows.uielement(v=VS.95).aspx

.NET 4: http://msdn.microsoft。 COM / EN-US /库/ system.windows.uielement.aspx

有一个解决方案?

我觉得WPF和Silverlight是相同的(的 http://msdn.microsoft.com/en-us/library/ff921107(V = pandp.20)的.aspx

我刚刚发现这一点:的http://social.msdn.microsoft.com/Forums/en/wpf/thread/9acb712a-b592-49e7-83a1-e3ee7ff03014

这是我的problam但我不能弄清楚如何使用ViewPort3D。 这里的code中的一部分:

 如果(showElement.Projection == NULL)
        {
            showElement.Projection =新PlaneProjection();
            showElement.RenderTransformOrigin =新的点(0.5,.5);
        }

        如果(hideElement.Projection == NULL)
        {
            hideElement.Projection =新PlaneProjection();
            hideElement.RenderTransformOrigin =新的点(0.5,.5);
        }

        mainStoryboard =新的故事板();

        BackEase hide_ease =新BackEase(){EasingMode = EasingMode.EaseOut,振幅= 0.2};

        // 显示
        PlaneProjection showPP =新PlaneProjection();
        CompositeTransform showCT =新CompositeTransform();
 

解决方案

不幸的是,这并不在WPF 3.5或4存在的,没有。只有在Silverlight中。但是,你当然可以推出自己的3-D WPF中。这里是一个例子的3-D旋转控制。下面是微软在 Viewport3D 的文档。

I downloaded a sample code from here: http://gallery.expression.microsoft.com/ShowHideWithFlip

Now my problem is that i'm using WPF and the guy is using Silverlight..

I thought they are both using .NET 4 but i found out there is ".NET 4" and there is ".NET for Silverlight" totla diffrent things..

i get this error:

'System.Windows.UIElement' does not contain a definition for 'Projection' and no   extension method 'Projection' accepting a first argument of type 'System.Windows.UIElement' could be found (are you missing a using directive or an assembly reference?)

I just found out why, the guy is using .NET for Silverlight and i'm using .NET 4.

Silverlight: http://msdn.microsoft.com/en-us/library/system.windows.uielement(v=VS.95).aspx

.NET 4: http://msdn.microsoft.com/en-us/library/system.windows.uielement.aspx

There is a solution for this?

I thought WPF and Silverlight is kinde of the same ( http://msdn.microsoft.com/en-us/library/ff921107(v=pandp.20).aspx )

I just found this: http://social.msdn.microsoft.com/Forums/en/wpf/thread/9acb712a-b592-49e7-83a1-e3ee7ff03014

This is my problam but i cant figure how to use the ViewPort3D. here is the part of the code:

        if (showElement.Projection == null)
        {
            showElement.Projection = new PlaneProjection();
            showElement.RenderTransformOrigin = new Point(.5, .5);
        }

        if (hideElement.Projection == null)
        {
            hideElement.Projection = new PlaneProjection();
            hideElement.RenderTransformOrigin = new Point(.5, .5);
        }

        mainStoryboard = new Storyboard();

        BackEase hide_ease = new BackEase() { EasingMode = EasingMode.EaseOut, Amplitude = 0.2 };

        // Show           
        PlaneProjection showPP = new PlaneProjection();
        CompositeTransform showCT = new CompositeTransform();

解决方案

Unfortunately this doesn't exist in WPF 3.5 or 4, no. Only in Silverlight. However, you can certainly roll your own 3-D in WPF. Here's one example of 3-D rotated controls. Here's Microsoft's doc on Viewport3D.

这篇关于UIElement.Projection只在Silverlight,而不是在WPF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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