Noesis 3.1.x Resource Dictionary Syntax
I'm seeing unstylized content (pink) throughout my UIs. In 3.0.x I maintained a resource dictionary with the following merged dictionaries:
Resources.xaml
In 3.1.2, I'm referencing these XAML files via the pack URI syntax and it is not finding the integrated XAML. Any suggestions on what the correct approach might be?
Errors:
[NOESIS/E] Assets/User Interface/Resources.xaml(4): Xaml not found '/Noesis.GUI.Extensions;component/Theme/NoesisTheme.DarkBlue.xaml'
[NOESIS/E] Assets/User Interface/Resources.xaml(6): Xaml not found '/Noesis.GUI.Extensions;component/Theme/NoesisTheme.Styles.xaml'
My Noesis settings specify the above Resources.xaml file as the Application Resources file.
Resources.xaml
Code: Select all
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<!-- Noesis 3.0.x -->
<ResourceDictionary Source="/Assets/NoesisGUI/Theme/NoesisTheme.Brushes.DarkBlue.xaml" />
<ResourceDictionary Source="/Assets/NoesisGUI/Theme/NoesisTheme.Fonts.xaml" />
<ResourceDictionary Source="/Assets/NoesisGUI/Theme/NoesisTheme.Styles.xaml" />
<ResourceDictionary Source="ResourcesImages.xaml"/>
<ResourceDictionary Source="ResourcesCommon.xaml"/>
<ResourceDictionary Source="ResourcesTheme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Code: Select all
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<!-- Noesis 3.1.2 -->
<ResourceDictionary Source="pack://application:,,,/Noesis.GUI.Extensions;component/Theme/NoesisTheme.DarkBlue.xaml" />
<ResourceDictionary Source="pack://application:,,,/Noesis.GUI.Extensions;component/Theme/NoesisTheme.Styles.xaml" />
<ResourceDictionary Source="ResourcesImages.xaml"/>
<ResourceDictionary Source="ResourcesCommon.xaml"/>
<ResourceDictionary Source="ResourcesTheme.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
[NOESIS/E] Assets/User Interface/Resources.xaml(4): Xaml not found '/Noesis.GUI.Extensions;component/Theme/NoesisTheme.DarkBlue.xaml'
[NOESIS/E] Assets/User Interface/Resources.xaml(6): Xaml not found '/Noesis.GUI.Extensions;component/Theme/NoesisTheme.Styles.xaml'
My Noesis settings specify the above Resources.xaml file as the Application Resources file.
Re: Noesis 3.1.x Resource Dictionary Syntax
As a temporary workaround, I am able to copy 3.1.2 themes to a folder within assets and reference them using a relative file path. The behavior seems to be related to the pack URI interface. Does it matter that my unmodified package source files (extracted from zip) exist outside of the Unity folder?
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: Noesis 3.1.x Resource Dictionary Syntax
Hi,
To reference the theme xamls included in our package the path should look like this:
Could you please try that?
To reference the theme xamls included in our package the path should look like this:
Code: Select all
<ResourceDictionary Source="/Packages/com.noesis.noesisgui/Theme/NoesisTheme.DarkBlue.xaml"/>
Re: Noesis 3.1.x Resource Dictionary Syntax
Works great! Thank you!
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: Noesis 3.1.x Resource Dictionary Syntax
Good to hear, marking this as solved.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 81 guests