martinj
Topic Author
Posts: 19
Joined: 20 Mar 2012, 15:38

Using projection in Blend WPF projects

28 Nov 2014, 07:58

I’m trying to animate the Projection for a Menu in my project.

Since I use the WPF Menu class I cannot edit the XAML in a Silverlight project and thus I wanted to use your NoesisGUIExtensions to allow both Blend and Noesis to be able to parse my file.
But I cannot seem to get this to work. Either I get Blend to parse the XAML or I get Noesis to parse it without errors, but never both at the same time.

When using your extension file (Element.cs) into Blend, Noesis gives me the following error: “Unknown type 'NoesisGUIExtensions.Element' (@114,5)”

My XAML is attached below. Blend can parse it, but I get the aforementioned error from Noesis (Unity3D).
<ControlTemplate.Resources>
    <Storyboard x:Key="SwingIn">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
            <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames  Storyboard.TargetProperty="(Noesis:Element.Projection).(Noesis:PlaneProjection.RotationY)" Storyboard.TargetName="grid">
            <SplineDoubleKeyFrame KeyTime="0" Value="-90"/>
            <SplineDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
</ControlTemplate.Resources>
<Border BorderBrush="White" BorderThickness="1" Background="White">
    <Grid x:Name="grid">
        <Noesis:Element.Projection>
            <Noesis:PlaneProjection RotationY="-90"/>
        </Noesis:Element.Projection>
        ...
    </Grid>
</Border>

If I change the XAML to the following it works fine in Noesis, but Blend goes bananas.
<ControlTemplate.Resources>
    <Storyboard x:Key="SwingIn">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid">
            <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
            <SplineDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames  Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="grid">
            <SplineDoubleKeyFrame KeyTime="0" Value="-90"/>
            <SplineDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
</ControlTemplate.Resources>
<Border BorderBrush="White" BorderThickness="1" Background="White">
    <Grid x:Name="grid">
        <Grid.Projection>
            <PlaneProjection RotationY="-90"/>
        </Grid.Projection>
        ...
    </Grid>
</Border>
Is there a solution that works in both Noesis and Blend?
 
User avatar
sfernandez
Site Admin
Posts: 1930
Joined: 22 Dec 2011, 19:20

Re: Using projection in Blend WPF projects

01 Dec 2014, 14:53

Hi, sorry for my late answer.

I checked your first XAML (the one using Noesis:Element.Projection) with latest 1.1.13 version, and is building without errors in Unity3D.

Which version are you using?

Who is online

Users browsing this forum: sfernandez and 3 guests