- AliciaCastillo
- Posts: 16
- Joined:
Inherit Noesis Theme or Styles merged into my custom Styles
Hi, I'm working in a project where I use VisualStudio 2022, Blend and Unity and i've got the NoesisGUI-Unity-3-2 package folder inside my project, at the same Assets folder level.
I'm trying to inherit Noesis Theme/Styles for some cases where I don't have a custom style defined yet. Fisrt of all, is this possible?
I have my own Styles.xaml (inside Assets/Templates) setted up in Noesis.Settings and I'm applying styles to my controls throw keys (Style={DymanicResource MyStyleKey}) and i've been trying to Merge into my ResourceDictionary the Noesis styles but it's giving me some url issues, is there a way to do so?
I'm trying to inherit Noesis Theme/Styles for some cases where I don't have a custom style defined yet. Fisrt of all, is this possible?
I have my own Styles.xaml (inside Assets/Templates) setted up in Noesis.Settings and I'm applying styles to my controls throw keys (Style={DymanicResource MyStyleKey}) and i've been trying to Merge into my ResourceDictionary the Noesis styles but it's giving me some url issues, is there a way to do so?
-
sfernandez
Site Admin
- Posts: 3112
- Joined:
Re: Inherit Noesis Theme or Styles merged into my custom Styles
Hello,
In the Blend project you should add our Noesis.GUI.Extension nuget, that will provide all our extensions and access to the Theme styles.
Then you can modify your App.xaml to include the theme and your resources:
In Unity you should have a dictionary that references the theme asset included in our Unity plugin and set it in the Application Resources in Noesis settings:
With that setup you can override some styles and use them (with name keys or by type), and the rest will default to the Noesis theme.
Is that what you are looking for?
In the Blend project you should add our Noesis.GUI.Extension nuget, that will provide all our extensions and access to the Theme styles.
Then you can modify your App.xaml to include the theme and your resources:
Code: Select all
<Application ...>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Noesis.GUI.Extensions;component/Theme/NoesisTheme.DarkBlue.xaml" />
<ResourceDictionary Source="/Assets/Templates/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
Code: Select all
<ResourceDictionary ...>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Packages/com.noesis.noesisgui/Theme/NoesisTheme.DarkBlue.xaml" />
<ResourceDictionary Source="/Assets/Templates/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Is that what you are looking for?
- AliciaCastillo
- Posts: 16
- Joined:
Re: Inherit Noesis Theme or Styles merged into my custom Styles
Hi!Hello,
In the Blend project you should add our Noesis.GUI.Extension nuget, that will provide all our extensions and access to the Theme styles.
Then you can modify your App.xaml to include the theme and your resources:In Unity you should have a dictionary that references the theme asset included in our Unity plugin and set it in the Application Resources in Noesis settings:Code: Select all<Application ...> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/Noesis.GUI.Extensions;component/Theme/NoesisTheme.DarkBlue.xaml" /> <ResourceDictionary Source="/Assets/Templates/Styles.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>
With that setup you can override some styles and use them (with name keys or by type), and the rest will default to the Noesis theme.Code: Select all<ResourceDictionary ...> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Packages/com.noesis.noesisgui/Theme/NoesisTheme.DarkBlue.xaml" /> <ResourceDictionary Source="/Assets/Templates/Styles.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
Is that what you are looking for?
Yeah thanks, that worked perfect :)
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest