Using PlaneProjection in XAML

Feb 7, 2012 at 10:21 AM

Hello,

Thanks for your good work.

I wondering if it is possible to use your PlaneProjection (WpfEffects) in XAML code for WPF.

I've tried to do this, but it does not work :(

I have to do something like this:

 <Storyboard x:Key="Animation" x:Name="Animation">
 <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Rotator" Storyboard.TargetProperty="RotationY">
  <EasingDoubleKeyFrame x:Name="rotationKeyFrame" KeyTime="00:00:00.9" Value="0">
   <EasingDoubleKeyFrame.EasingFunction>
    <CubicEase />
   </EasingDoubleKeyFrame.EasingFunction>
  </EasingDoubleKeyFrame>
 </DoubleAnimationUsingKeyFrames>
</Storyboard>

where "Rotator" is a Grid:

<Grid RenderTransformOrigin=".5,.5">
 <Grid.RenderTransform>
  <ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1" />
 </Grid.RenderTransform>
 <Grid.Projection>
  <PlaneProjection x:Name="Rotator" CenterOfRotationX="0.5" />
 </Grid.Projection>
 <ContentControl x:Name="ContentPresenter" RenderTransformOrigin="0.5,0.5" Cursor="Hand" >
  <ContentPresenter/>
 </ContentControl>
</Grid>

Thanks a lot,

brunettidoc

Feb 7, 2012 at 10:29 AM
you should be able to do something like this, but not using the same exact markup as in Silverlight. In the source code version, there is a sample for the wpf plane projection that you can try.

Envoyé à partir de mon Windows Phone

De : brunettidoc
Envoyé : 07/02/2012 11:21
À : simon.ferquel@hotmail.fr
Objet : Using PlaneProjection in XAML [slflow:296966]

From: brunettidoc

Hello,

Thanks for your good work.

I wondering if it is possible to use your PlaneProjection (WpfEffects) in XAML code for WPF.

I've tried to do this, but it does not work :(

I have to do something like this:

<Storyboard x:Key="Animation" x:Name="Animation">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Rotator" Storyboard.TargetProperty="RotationY">
<EasingDoubleKeyFrame x:Name="rotationKeyFrame" KeyTime="00:00:00.9" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase />
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>

where "Rotator" is a Grid:

<Grid RenderTransformOrigin=".5,.5">
<Grid.RenderTransform>
<ScaleTransform x:Name="scaleTransform" ScaleX="1" ScaleY="1" />
</Grid.RenderTransform>
<Grid.Projection>
<PlaneProjection x:Name="Rotator" CenterOfRotationX="0.5" />
</Grid.Projection>
<ContentControl x:Name="ContentPresenter" RenderTransformOrigin="0.5,0.5" Cursor="Hand" >
<ContentPresenter/>
</ContentControl>
</Grid>

Thanks a lot,

brunettidoc

Feb 8, 2012 at 9:02 AM

Thank you very much for your quick reply!

I'm going to test your suggestion.

Thanks a lot,

brunettidoc