View Issue Details

IDProjectCategoryView StatusLast Update
0004276NoesisGUIStudiopublic2026-11-06 11:17
Reporterdstewart Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status assignedResolutionopen 
Product VersionStudio_Beta 
Target VersionStudio_Beta 
Summary0004276: Setting a Style to be "BasedOn" Another Style Produces a XAML Error
Description

Currently, it appears that Setting a GlobalResource Style to be based on another GlobalResource Style creates a XAML error.


Repro Steps:

1) Download and open the attached Project, and open the MainPage.xaml.
2) Open the Resources Panel, and visually inspect that all Resources are contained within GlobalResources.xaml
3) Right-Click on the YELLOW tile on the Stage, and from its ContextMenu, select 'Style', then 'Edit'. This will open the 'Derivative' Styled for Edit.

4) In the Style Dummy Editor, select the STYLE from the Navigator, and from the top of the Properties Panel, set its 'BasedOn' Property to be BasedOn the Style named 'CheckBox_Style_Base'.

Observe how a XAML Error is produced.

Expected Results: Supported and valid "BasedOn" operations don't produce XAML errors.

5) Open GlobalResources.xaml in VSCode

Observe how the error appears to be related to the Resource being referenced as a StaticResource.

Attached Files
BasedOnStyle.jpg (725,588 bytes)   
BasedOnStyle.jpg (725,588 bytes)   
PlatformAny

Relationships

related to 0004278 assigneddfranjic Middle-Mouse Clicking on a Style Property Doesn't Revert To BasedOn Property 
related to 0004277 resolvedsfernandez Setting a Style to be 'BasedOn' Another Doesn't Show It As 'Active' In the Property Dropdown 

Activities

dfranjic

dfranjic

2026-11-05 23:10

developer   ~0012879

Not sure what should be done about this. It's not a bug of Studio, it's expected that it shows errors.
That's because your DERIVATIVE style is defined before the BASE style, and the StaticResource (which must be used for BasedOn property) can only find resources defined before the point where it's used.

The fix would be to move BASE style above the DERIVED one in the resources panel. So technically, nothing on Studio's side. Maybe the UX could be improved somehow, not sure how, but it doesn't even warn the user or anything...

dstewart

dstewart

2026-11-06 11:16

developer   ~0012880

Last edited: 2026-11-06 11:17

Interesting. It never occurred to me to have to adjust the order in the Resources.

Maybe once you link-up Derived Style and Main Style, we throw a toast up that says "{Derived} Style uses {Base} Style, but is declared before it. It is recommended to move {Base} Style above {Derived} Style in the Resource Dictionary".

or, alternately, is this something that wouldn't happen if they used DynamicResource instead of StaticResource? If so, could we just default to setting Resources as Dynamic?

Issue History

Date Modified Username Field Change
2025-07-01 17:50 dstewart New Issue
2025-07-01 17:50 dstewart File Added: StylesAndTemplatesBasedOn_StaticResource.zip
2025-07-01 17:50 dstewart File Added: BasedOnStyle.jpg
2025-07-01 17:57 dstewart Relationship added related to 0004277
2025-07-01 18:08 dstewart Description Updated
2025-07-01 18:28 dstewart Relationship added related to 0004278
2025-07-02 11:38 sfernandez Assigned To => sfernandez
2025-07-02 11:38 sfernandez Status new => assigned
2025-07-02 11:38 sfernandez Target Version => Studio_Beta
2026-11-05 23:10 dfranjic Note Added: 0012879
2026-11-06 11:16 dstewart Note Added: 0012880
2026-11-06 11:16 dstewart Note Edited: 0012880
2026-11-06 11:17 dstewart Note Edited: 0012880