View Issue Details

IDProjectCategoryView StatusLast Update
0003107NoesisGUIStudiopublic2024-02-27 22:33
Reportermaherne Assigned Todfranjic  
PrioritynormalSeveritycrash 
Status resolvedResolutionfixed 
Product VersionStudio_Alpha 
Target VersionStudio_Alpha 
Summary0003107: Crash when adding elements to auto selected DataTemplates
Description

When editing a ContentControl ContentTemplate which has been auto selected based on content type, attempting to add any element will cause the follow error:

item.scopeElement was nullptr.
Gui.Editor.dll!Editor::TemplateScope::RebuildVisualTree() Line 387
at C:\Source\Noesis\NoesisEditor\NoesisSDK\Native\Src\Packages\Gui\Editor\Src\TemplateScope.cpp(387)
Gui.Editor.dll!Editor::XamlDocument::RefreshScopeResource(Editor::Scope scope) Line 4429
at C:\Source\Noesis\NoesisEditor\NoesisSDK\Native\Src\Packages\Gui\Editor\Src\XamlDocument.cpp(4429)
Gui.Editor.dll!Editor::XamlDocument::RefreshScopeResource() Line 4346
at C:\Source\Noesis\NoesisEditor\NoesisSDK\Native\Src\Packages\Gui\Editor\Src\XamlDocument.cpp(4346)
Gui.Editor.dll!Editor::InsertElementsCommand::Execute() Line 197
at C:\Source\Noesis\NoesisEditor\NoesisSDK\Native\Src\Packages\Gui\Editor\Src\InsertElementsCommand.cpp(197)
Gui.Editor.dll!Editor::AddElementToolState::MouseUp(Noesis::BaseComponent
__formal, const Noesis::MouseButtonEventArgs & e) Line 238
at C:\Source\Noesis\NoesisEditor\NoesisSDK\Native\Src\Packages\Gui\Editor\Src\AddElementToolState.cpp(238)

Steps To Reproduce

In the attached project, edit the ContentControl ContentTemplate, and add an element to the Grid.

Attached Files
DataTemplateCrash.zip (2,217 bytes)
PlatformAny

Activities

dfranjic

dfranjic

2024-02-27 22:33

developer   ~0009248

This was working for ItemsControl but wasn't implemented for ContentControl...
When updating something in a ContentControl's implicit DataTemplate it requires a manual trigger to update the visual tree with new elements.

Issue History

Date Modified Username Field Change
2024-02-21 15:33 maherne New Issue
2024-02-21 15:33 maherne File Added: DataTemplateCrash.zip
2024-02-21 15:33 maherne Target Version => Studio_Alpha
2024-02-21 15:56 jsantos Assigned To => aschmitt
2024-02-21 15:56 jsantos Status new => assigned
2024-02-21 15:56 jsantos Assigned To aschmitt => dfranjic
2024-02-27 22:33 dfranjic Status assigned => resolved
2024-02-27 22:33 dfranjic Resolution open => fixed
2024-02-27 22:33 dfranjic Note Added: 0009248