Using a sample theme in Blend: Undefined CLR Namespace
I have a Blend project that I can successfully build (no errors or warnings) and load the XAML in to my C++ application. All good.
I am attempting to add a sample theme (Noesis.Theme.LightRed.xaml). However I get:
I have installed the Noesis.GUI.Extensions nuget but it's still not working. In NoesisTheme.Styles.xaml the line
has squiggles under it with the error that it can't be found.
Any idea how I can fix this.
I am attempting to add a sample theme (Noesis.Theme.LightRed.xaml). However I get:
Code: Select all
XLS0419 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'NoesisGUIExtensions' that could not be found. GA-blend C:\blendui\Theme\NoesisTheme.Styles.xaml 5
Code: Select all
xmlns:local="clr-namespace:NoesisGUIExtensions">Any idea how I can fix this.
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Using a sample theme in Blend: Undefined CLR Namespace
This is probably because you are including the theme xamls in your Blend project, instead of using the resources included in Noesis.GUI.Extensions package.
You can reference them in the App.xaml (after adding the nuget package) by specifying in the Uri also the assembly, like this:
Have you tried that?
You can reference them in the App.xaml (after adding the nuget package) by specifying in the Uri also the assembly, like this:
Code: Select all
<ResourceDictionary Source="pack://application:,,,/Noesis.GUI.Extensions;component/Theme/NoesisTheme.LightRed.xaml" />Re: Using a sample theme in Blend: Undefined CLR Namespace
Thank you, yes, I did have them as part of the blend project so they were easier to edit. Removing them stops the errors.
Is this not possible then?
Is this not possible then?
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Using a sample theme in Blend: Undefined CLR Namespace
If you want to edit a local copy of the theme files then you'll need to change the namespace prefix in NoesisTheme.Styles.xaml to point to the Noesis.GUI.Extensions assembly, so types and properties referenced in that xaml can be correctly resolved:
Code: Select all
xmlns:local="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"Re: Using a sample theme in Blend: Undefined CLR Namespace
Ah thank you, yes that worked.
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Using a sample theme in Blend: Undefined CLR Namespace
Great, marking this as solved.
Who is online
Users browsing this forum: Google [Bot] and 11 guests