View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004330 | NoesisGUI | Unity | public | 2025-08-04 20:57 | 2025-08-06 13:00 |
| Reporter | RisingSunStudios | Assigned To | sfernandez | ||
| Priority | normal | Severity | minor | ||
| Status | resolved | Resolution | no change required | ||
| Product Version | 3.2 | ||||
| Target Version | 3.2.9 | ||||
| Summary | 0004330: Application Resources dictionary is empty | ||||
| Description | I have the following method to retrieve a brush from the application resources. The brush I want to retrieve is inside of Theme.Brushes.Primary.xaml.
if I put a breakpoint after the first line, the resourceDictionary has 0 keys and the exception is always hit. When I inspect the application resource dictionary, it has all the correct merged dictionaries, but I would expect their keys to be accessible within the resource dictionary returned by GetApplicationResources() | ||||
| Platform | Windows | ||||
|
I just found this thread, seems like it's desired behavior, just need to iterate the merged dictionaries, feel free to close this - I don't think i can do that! Thanks |
|
|
Hi, The expected behavior of a ResourceDictionary is that Contains and [] will search inside merged dictionaries too.
This code works with our default NoesisTheme.DarkBlue.xaml set as the Application Resources. The resource "Font.Family.Default" is defined in the merged dictionary NoesisTheme.Fonts.xaml. Are you able to reproduce your problem in a small project and share it here? |
|
|
If this is in Editor mode, make sure you don't interact with Noesis until the first Editor update. Before that, Noesis is probably not initialized. |
|
|
So I just reverted my code back to not iterate the merged dictionaries and now it is working as expected. The keys I was searching for were new additions to the xaml file, so all I can think is that the xaml file wasn't imported until after I changed the code to iterate the merged dictionaries, even though it was 100% saved and I'm positive I would see the "xaml file loaded" message in the unity logs. But all seems fine now, sorry for the false alarm! For reference, this was being run during runtime. |
|
|
Thanks. Please reopen if you see this again. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-08-04 20:57 | RisingSunStudios | New Issue | |
| 2025-08-04 20:58 | RisingSunStudios | Description Updated | |
| 2025-08-04 21:05 | RisingSunStudios | Severity | block => minor |
| 2025-08-04 21:09 | RisingSunStudios | Note Added: 0010954 | |
| 2025-08-05 11:10 | sfernandez | Assigned To | => sfernandez |
| 2025-08-05 11:10 | sfernandez | Status | new => feedback |
| 2025-08-05 11:10 | sfernandez | Note Added: 0010956 | |
| 2025-08-05 12:37 | jsantos | Target Version | => 3.2.9 |
| 2025-08-05 12:38 | jsantos | Note Added: 0010957 | |
| 2025-08-05 12:38 | jsantos | Note Edited: 0010957 | |
| 2025-08-05 14:56 | RisingSunStudios | Note Added: 0010958 | |
| 2025-08-05 14:56 | RisingSunStudios | Status | feedback => assigned |
| 2025-08-05 14:56 | RisingSunStudios | Note Edited: 0010958 | |
| 2025-08-05 14:57 | RisingSunStudios | Note Edited: 0010958 | |
| 2025-08-05 14:59 | RisingSunStudios | Note Edited: 0010958 | |
| 2025-08-06 13:00 | jsantos | Status | assigned => resolved |
| 2025-08-06 13:00 | jsantos | Resolution | open => no change required |
| 2025-08-06 13:00 | jsantos | Note Added: 0010961 | |
| 2025-10-10 13:29 | jsantos | Category | Unity3D => Unity |