Dmirty
Topic Author
Posts: 7
Joined: 19 Oct 2022, 19:50

Newbie + Blend + dark Noesis.App.Theme

13 Nov 2022, 08:25

Hello there.
I just start with NoesisGUI and know almost nothing. I'm trying to make a window in Blend with dark theme.
So, I created a new WPF project, then added Noesis.App.Theme
NuGet\Install-Package Noesis.App.Theme -Version 3.1.5
After that I added ResourceDictionary Source into my App.xaml
  <Application.Resources>
    <ResourceDictionary Source="pack://application:,,,/Noesis.GUI.Extensions;component/Theme/NoesisTheme.DarkBlue.xaml" />
  </Application.Resources>
After that Blend shows me an error:
XDG0062 Could not load file or assembly 'Noesis.GUI.Extensions, Culture=neutral, PublicKeyToken=null'. The specified file cannot be found
How can I solve this?
 
daldegam
Posts: 10
Joined: 17 Jan 2020, 14:54

Re: Newbie + Blend + dark Noesis.App.Theme

14 Nov 2022, 15:39

Use the NuGet package manager and install the Noesis.GUI.Extensions.
 
Dmirty
Topic Author
Posts: 7
Joined: 19 Oct 2022, 19:50

Re: Newbie + Blend + dark Noesis.App.Theme

14 Nov 2022, 21:32

Use the NuGet package manager and install the Noesis.GUI.Extensions.
Done. Now it shows:
XDG0062 Cannot locate resource "theme/noesistheme.darkblue.xaml"
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Newbie + Blend + dark Noesis.App.Theme

14 Nov 2022, 22:50

Have you tried one of our examples? For example, the Gallery? You don't need to download it from GitHub, it is included in our C# SDK.
 
Dmirty
Topic Author
Posts: 7
Joined: 19 Oct 2022, 19:50

Re: Newbie + Blend + dark Noesis.App.Theme

15 Nov 2022, 18:52

Have you tried one of our examples? For example, the Gallery? You don't need to download it from GitHub, it is included in our C# SDK.
No. Thank you, I'll try it.
 
mshvern23
Posts: 35
Joined: 22 May 2023, 02:00

Re: Newbie + Blend + dark Noesis.App.Theme

23 May 2023, 02:03

Same problem. Fresh project, following Unreal guide, everything else works.
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: Newbie + Blend + dark Noesis.App.Theme

24 May 2023, 10:34

I reproduced the steps explained in Unreal guide, Blend section:
  1. Create WPF (.NET Framework) application
  2. Install Noesis.GUI.Extensions nuget
  3. Set one of the Noesis themes in the App.xaml:
    <Application
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      StartupUri="GUI/MainPage.xaml">
      <Application.Resources>
        <ResourceDictionary Source="pack://application:,,,/Noesis.GUI.Extensions;component/Theme/NoesisTheme.DarkBlue.xaml" />
      </Application.Resources>
    </Application>
  4. Added a button to the MainWindow.xaml
After that I just hit F5 (Start Debugging) in Blend and everything renders fine without any error and using our theme. What problem are you facing?
 
mshvern23
Posts: 35
Joined: 22 May 2023, 02:00

Re: Newbie + Blend + dark Noesis.App.Theme

24 May 2023, 17:00

With your exact code I'm getting:
Inner Exception 1:
IOException: Cannot locate resource 'theme/noesistheme.darkblue.xaml'.

I just fixed it, posting it here for search engines.
Apparently there are two different types of Blend projects: WPF C# Application and WPF C# (.NET Framework) application. For NoesisGUI to work properly, you need to create the latter one,
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: Newbie + Blend + dark Noesis.App.Theme

24 May 2023, 19:33

Thanks for the update. I found that the assemblies generated for net5.0 and netcoreapp3.1 were not including the theme resources.
We fixed it in Noesis.GUI.Extensions 3.0.20 that is already uploaded.

Anyway, we still recommend creating .NET Framework projects to work with Blend because the designer and tools are more complete (you would be able to use Triggers and Data panels).
 
mshvern23
Posts: 35
Joined: 22 May 2023, 02:00

Re: Newbie + Blend + dark Noesis.App.Theme

25 May 2023, 02:45

On a related note, I saw you recommending a workflow with the Resources tab: viewtopic.php?t=2104#p11705

However, it doesn't seem like that feature is working in Blend for 2022 Visual Studio: https://developercommunity.visualstudio ... :-/1584204.

After fiddling with both Visual Studio 2019 and 2022 versions, I can say that the 2019 version works much better for the purposes of using Blend and NoesisGUI.

Considering all the samples use Resources.xaml and 2022 Visual Studio doesn't have an option to edit anything that's not included within the immediate XAML file visually, I think it would be good to recommend people to use the 2019 version in all of the Quickstart documentation for Noesis.

Who is online

Users browsing this forum: Google [Bot] and 95 guests