unvestigate
Topic Author
Posts: 21
Joined: 17 Jan 2018, 09:55

Xaml errors in Blend

23 Mar 2019, 16:15

Hi guys,

I recently integrated Noesis into my custom engine and so far the samples are running and get rendered beautifully. For me, the next step is setting up a nice environment for working with xaml. I started reading this tutorial https://www.noesisengine.com/docs/Gui.C ... unity.html since it claims to be a introduction to both working with Noesis and Blend, which I haven't worked with before. I am not using Unity, but I figured I should follow along with the tutorial first, so I downloaded Unity along with Noesis 2.2 for Unity and started with the tutorial.

I am using Visual Studio 2015 update 3 and the version of Blend that comes with that. I can run the Buttons sample allright in Unity but when trying to open the window in Blend I get a bunch of xaml errors. The first thing that became clear to me is that I need to install the Noesis Noesis.GUI.Extensions package through nuget. Please let me know if this should not be necessary. The tutorial does not mention this but without the package I get errors on this line:
xmlns:noesis="clr-namespace:NoesisGUIExtensions"
After installing the package I was able to get the code working, specifically the references to SetFocusAction which comes from the extension lib, but only after modifying the above row like this:
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"
Should be allright...? However, I am a bit surprised that the tutorial does not mention any of this, which I why I wonder if I am doing something wrong. With that in place I can now run the code with the SetFocusAction. However, I get errors in Blend regarding the SetFocusActions like this:
Cannot add instance of type 'SetFocusAction' to a collection of type 'TriggerActionCollection'. Only items of type 'T' are allowed.
The errors don't prevent me from running the code though, but they show up in the error window and cause the designer to show the "Invalid Markup" text. I also get this error from the EventTrigger references in the code:
The type 'EventTrigger' from assembly 'System.Windows.Interactivity' is built with an older version of the Blend SDK, and is not supported in a Windows Presentation Framework 4
Again, these don't prevent me from running the code, but they break the designer in Blend. My target framework for the Blend project is set to 4.5.

Thank you for any help you can give me!
 
unvestigate
Topic Author
Posts: 21
Joined: 17 Jan 2018, 09:55

Re: Xaml errors in Blend

23 Mar 2019, 17:34

I managed to fix the last errors by using the solution in the answer of this SO post: https://stackoverflow.com/questions/320 ... -is-not-su

I'll leave this here as a reference if other people are having the same issue.
 
User avatar
sfernandez
Site Admin
Posts: 1912
Joined: 22 Dec 2011, 19:20

Re: Xaml errors in Blend

25 Mar 2019, 12:12

Thanks for the detailed feedback.

You are doing things right, you have to use the Noesis.GUI.Extensions package from NuGet in Blend to make Noesis extensions work fine.
We will fix the documentation for eveybody to avoid any further problems.
I managed to fix the last errors by using the solution in the answer of this SO post: https://stackoverflow.com/questions/320 ... -is-not-su
Yes, I was going to point to that precise solution, thanks for sharing it with the community.

Who is online

Users browsing this forum: No registered users and 0 guests