View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002101 | NoesisGUI | C++ SDK | public | 2021-09-01 15:29 | 2021-09-06 13:06 |
Reporter | fnlombard | Assigned To | sfernandez | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.1.0 | ||||
Target Version | 3.1.1 | Fixed in Version | 3.1.1 | ||
Summary | 0002101: Merged Dictionaries not loading when calling LoadXaml | ||||
Description | In our application, we have several DataTemplates that we load directly from XAML files during runtime. The typical structure of a file is shown below: <DataTemplate xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:sys="clr-namespace:System"> <DataTemplate.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="MyStyleFile.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </DataTemplate.Resources> <StackPanel> <Control Style={StaticResource MyStyle}/> </StackPanel> </DataTemplate> This worked correctly in Noesis 2.2.6. In Noesis 3.1.0, it seems that the merged resource dictionary is not loaded. Consequently, the style of the control cannot be found. We use the Noesis::GUI::LoadXaml() function to load these DataTemplates. For this we do not want to use ‘SetApplicationResources’ because the style and the data template should not be globally available. | ||||
Tags | ResourceDictionary | ||||
Platform | Windows | ||||
Side question: When using 'SetApplicationResources': Merged resource dictionaries are only loaded if a XAML file's root element is a ResourceDictionary. The merged resource dictionaries of child elements, for example a ControlTemplate, are not loaded. Will the fix that you are working on also fix this? Thanks |
|
Yes, the bug appears in any MergedDictionary contained in templates. We will fix it for both ControlTemplates and DataTemplates. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-09-01 15:29 | fnlombard | New Issue | |
2021-09-01 15:29 | fnlombard | Tag Attached: ResourceDictionary | |
2021-09-02 19:45 | sfernandez | Assigned To | => sfernandez |
2021-09-02 19:45 | sfernandez | Status | new => assigned |
2021-09-02 19:45 | sfernandez | Product Version | 3.1 => 3.1.0 |
2021-09-02 19:45 | sfernandez | Target Version | => 3.1.1 |
2021-09-03 09:33 | fnlombard | Note Added: 0007403 | |
2021-09-03 10:34 | sfernandez | Status | assigned => feedback |
2021-09-03 10:34 | sfernandez | Note Added: 0007404 | |
2021-09-06 13:06 | sfernandez | Status | feedback => resolved |
2021-09-06 13:06 | sfernandez | Resolution | open => fixed |
2021-09-06 13:06 | sfernandez | Fixed in Version | => 3.1.1 |