Page 1 of 1

[Blend] How to design WPF XAML and use Projection transforms

Posted: 06 Oct 2014, 13:05
by timashev
Hi,

I've found that WPF XAML standard (compared to Silverlight XAML) provides the best set of features I need to design UI in Microsoft Blend 2013 for NoesisGUI.

But now I want to add Projection animations (for transition between the VisualStates) those are supported by NoesisGUI, but Blend doesn't accept tags like <Grid.Projection><PlaneProjection ... /></Grid.Projection> in XAML files in WPF projects.

To port everything to Silverlight XAML subset just to be able to use Projection transforms in Blend is not an option, first of all because of a huge amount of work, and secondly because I like WPF XAML more than its Silverlight subset, and WPF XAML just works fine with NoesisGUI. Normally in WPF the developer doesn't need Projection transforms because WPF XAML has full 3D features (Viewport3D and so on), but NoesisGUI does not support WPF 3D features, so it's not an option as well.

My question: is there some hack to make Blend accept <*.Projection/> and <PlaneProjection/> tags as well as "(UIElement.Projection).(PlaneProjection.*)" in Storyboard.TargetProperty attribute in XAML files in WPF project? If Blend can't display Projections correctly in WPF project, then I want it to ignore these tags at the least. Is that possible? Maybe I should add some dummy C# classes to WPF project to fool Blend, add the same classes to my Unity project and inherit them from according NoesisGUI classes to make it work in Unity with NoesisGUI?

Another possible approach I'm thinking of is to extract the storyboards to styles or resources, and use WPF-compatible ones in WPF project, and design Silverlight-compatible storyboards from separate Silverlight project in Blend. However I suspect that it may lead to undesired degree of XAML code complexity...

What would you suggest? Have you (or somebody else) successfully solved similar problem before?

Re: [Blend] How to design WPF XAML and use Projection transf

Posted: 08 Oct 2014, 18:53
by sfernandez
Hi,

We usually work with Silverlight projects when we want to create Projection animation/effects. So didn't have to deal with these problems. But we understand your situation and have been thinking about it.

Maybe the solution is to define a helper class with a 'Projection' attached property that you can use in your Blend WPF projects. We will have to expose also some place-holder classes for the Projection, PlaneProjection and Matrix3DProjection to be used in Blend.

Then we can treat in our code that attached property to be the same as the UIElement.Projection property. This way, modifications made to that property are automatically detected by our UIElement class.

This will allow you to work in Blend with a WPF project and define any projection you want without breaking the parser:
<Grid>
    <noesis:UIElementExtension.Projection>
        <PlaneProjection RotationY="40"/>
    </noesis:UIElementExtension.Projection>
    ...
</Grid>
At the same time Silverlight projects can continue using the UIElement.Projection property.

We will implement it in a future version.

Re: [Blend] How to design WPF XAML and use Projection transf

Posted: 09 Oct 2014, 17:40
by timashev
Thanks. I will try to use it in v1.1.12 (did you mean this future version?) and let you know the result.

Re: [Blend] How to design WPF XAML and use Projection transf

Posted: 10 Oct 2014, 03:22
by wckdspn
I've been wondering how Blend itself supports this, whether it hosts either the WPF or Silverlight renderer depending on the project, or whether it has a single renderer and it just relies on the loaded base libraries for behavior. If it's the latter, it might be possible to shiv in support.

Re: [Blend] How to design WPF XAML and use Projection transf

Posted: 12 Oct 2014, 19:21
by jsantos
I've been wondering how Blend itself supports this, whether it hosts either the WPF or Silverlight renderer depending on the project, or whether it has a single renderer and it just relies on the loaded base libraries for behavior. If it's the latter, it might be possible to shiv in support.
Each renderer follow a different path. In fact, the last time I investigated about Silverlight it seemed to be a software based renderer. That would explain how they ported it to Max and Linux.

Re: [Blend] How to design WPF XAML and use Projection transf

Posted: 12 Oct 2014, 19:23
by jsantos
Thanks. I will try to use it in v1.1.12 (did you mean this future version?) and let you know the result.
Yes, this will be included in the imminent 1.1.12 version. In fact we already committed the classes for Blend:

https://github.com/Noesis/noesisgui-con ... 594226034b

Re: [Blend] How to design WPF XAML and use Projection transf

Posted: 13 Oct 2014, 19:14
by timashev
Thanks, I confirm that this class/tags are accepted by Blend. Waiting for v1.1.12 release to test it in Unity with NoesisGUI :)

Re: [Blend] How to design WPF XAML and use Projection transf

Posted: 15 Oct 2014, 01:38
by wckdspn
I've been wondering how Blend itself supports this, whether it hosts either the WPF or Silverlight renderer depending on the project, or whether it has a single renderer and it just relies on the loaded base libraries for behavior. If it's the latter, it might be possible to shiv in support.
Each renderer follow a different path. In fact, the last time I investigated about Silverlight it seemed to be a software based renderer. That would explain how they ported it to Max and Linux.
That's disappointing. Even for Silverlight 5?