View Issue Details

IDProjectCategoryView StatusLast Update
0001379NoesisGUIC# SDKpublic2018-12-24 10:32
Reporterai_enabledAssigned Tosfernandez 
PrioritynormalSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Product Version2.2.0 
Target VersionFixed in Version 
Summary0001379: New approach for loading ResourceDictionary similar to WPF's Application.Resources
DescriptionThis feature will allow us to reduce the MergedDictionaries cross-referencing bloat we have in our ResourceDictionaries by referencing all of them in a single ResourceDictionary similar to how WPF's Application.Resources works. Supposedly, it will also improve loading times, performance and memory usage due to fewer resources duplication.


Feature explanation:
In WPF it's possible to reference any resource from Style1.xaml from Style2.xaml if they're both referenced from the Application ResourceDictionary (via MergedDictionaries). So Style2.xaml doesn't need to have a MergedDictionaries entry for Style1.xaml. (please see the attached WPF project source demonstrating this approach)

However, it's impossible to use with NoesisGUI due to API limitations. When NoesisGUI loading Resources.xaml via GUI.LoadXaml(pathToFile) it starts loading all the merged MergedDictionaries one by one - Style1.xaml, then Style2.xaml. And here an exception happens as Style2.xaml references some static resource from Style1.xaml and NoesisGUI cannot locate it.

A special API is required to allow this scenario. For example:
<code>
var applicationResourceDictionary = GUI.LoadApplicationResourcesXaml("Resources.xaml");
GUI.SetApplicationResources(applicationResourceDictionary);
</code>

Regards!
TagsNo tags attached.
PlatformAny

Activities

ai_enabled

ai_enabled

2018-12-21 17:45

updater  

WpfSampleMergingRes.7z (5,673 bytes)

Issue History

Date Modified Username Field Change
2018-12-21 17:45 ai_enabled New Issue
2018-12-21 17:45 ai_enabled File Added: WpfSampleMergingRes.7z
2018-12-21 17:46 ai_enabled Description Updated View Revisions
2018-12-24 10:32 sfernandez Assigned To => sfernandez
2018-12-24 10:32 sfernandez Status new => assigned