UIElement.Projection only in Silverlight and not in WPF?
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.Wind开发者_JAVA技巧ows.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.
精彩评论