View Issue Details

IDProjectCategoryView StatusLast Update
0001507NoesisGUIUnitypublic2019-06-28 13:44
Reporterjswigart Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status feedbackResolutionopen 
Product Version2.2.3 
Summary0001507: Control Template not working correctly in Noesis
Description

I am new to Noesis and XAML, but I am mocking up a UI in Blend and testing it in Unity at the same time while I learn. I am running into an unexpected issue when trying to get a control class working. It's working as expected in blend, but in Unity, although I get no errors from Noesis, the buttons show up as normal radio buttons.

Here is an archive of the complete project
MapMaperUI.sln is the blend project

https://www.dropbox.com/s/dqtlic91zc5d8oi/MapMaker.zip?dl=0

Steps To Reproduce

Unzip and Open Unity project in Unity 2019.1.8f1, observe how the unity project does not show the radio buttons as the same large buttons that the preview in blend shows. Issue also happens in Unity 2018 before I upgraded.

Attached Files
blend.png (20,328 bytes)   
blend.png (20,328 bytes)   
unity.JPG (41,243 bytes)   
unity.JPG (41,243 bytes)   
PlatformWindows

Activities

sfernandez

sfernandez

2019-06-25 10:17

manager   ~0005761

Hello,

In Unity App.xaml is not available so we offer in Noesis Settings an 'Application Resources' where you can set a dictionary with the resources of the application.
You can create a Resources.xaml like this:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MapMakerUI.Assets.UI">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Images_UI.xaml"/>
<ResourceDictionary Source="ControlStyles.xaml"/>
<ResourceDictionary Source="Templates.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

And then include that in App.xaml and also set it in Unity's 'Application Resources' so you have the same environment in both Blend and Unity.

Let me know if you need more help with this.

jswigart

jswigart

2019-06-25 15:18

reporter   ~0005763

Yes that got my custom controls working. Thanks. I figured it was something trivial.

However, for clarity, shouldn't it be possible to make Noesis debug log the fact that it is coming across references to resources that it doesn't know how to resolve? Loading the root page is loading items that reference a template that it doesn't know exists, so I would think that would be a nice time to print a warning about being unable to resolve template x or whatever. Blend is very nicely verbose with its debug output printing. I tried running it in the broken state on all the Noesis log levels to see if I could get any hints and got nothing.

sfernandez

sfernandez

2019-06-28 13:43

manager   ~0005773

Last edited: 2019-06-28 13:44

I just confirmed that WPF doesn't raise any errors or warning messages when using DynamicResouces that cannot be resolved. It is Blend the only one that gives you some warning hint (blue underline) when it thinks a DynamicResource wouldn't resolve, although it could be wrong as the resource can be added later in code.

In Noesis we don't log any warning neither, because when a DynamicResource cannot be resolved the property should fallback to the default value.

Using StaticResources otherwise will give you a clear error message when the resource is not found.

Issue History

Date Modified Username Field Change
2019-06-25 01:41 jswigart New Issue
2019-06-25 01:41 jswigart File Added: blend.png
2019-06-25 01:41 jswigart File Added: unity.JPG
2019-06-25 01:56 jswigart Description Updated
2019-06-25 01:56 jswigart Steps to Reproduce Updated
2019-06-25 10:17 sfernandez Assigned To => sfernandez
2019-06-25 10:17 sfernandez Status new => feedback
2019-06-25 10:17 sfernandez Note Added: 0005761
2019-06-25 15:18 jswigart Note Added: 0005763
2019-06-25 15:18 jswigart Status feedback => assigned
2019-06-28 13:43 sfernandez Status assigned => feedback
2019-06-28 13:43 sfernandez Note Added: 0005773
2019-06-28 13:44 sfernandez Note Edited: 0005773
2025-10-10 13:29 jsantos Category Unity3D => Unity