View Issue Details

IDProjectCategoryView StatusLast Update
0001439NoesisGUIC++ SDKpublic2019-04-08 17:52
Reportersckriel Assigned Tosfernandez  
PrioritynormalSeveritycrash 
Status resolvedResolutionfixed 
Product Version2.2.0 
Target Version2.2.2Fixed in Version2.2.2 
Summary0001439: LoadXAML crashes with DataTemplate as root element
Description

We are storing DataTemplate and ControlTemplate in separate files that we load in the code behind. Sometimes this crashes. I have tested this in the XAML player too. Loading one file will lead to the "invalid root element" message, while another file will crash the XAML player. I have reduced the files that work and crashes to their simplest form and have deduced that the addition of resources for the DataTemplate makes it work. If no resources are defined, it crashes.

Steps To Reproduce
  1. Open XAML player.
  2. Load DataTemplate _Works.xaml, it will work and report appropriate error message since the file cannot actually be viewed since it's a Data Template.
  3. Load DataTemplate_Crashes.xaml, XAML Player crashes.
Attached Files
DataTemplate_Crashes.xaml (237 bytes)   
<DataTemplate
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System">


    <Border>
    </Border>
</DataTemplate>

DataTemplate_Crashes.xaml (237 bytes)   
DataTemplate _Works.xaml (490 bytes)   
<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>
            <ControlTemplate x:Key="Thing" TargetType="{x:Type Button}">
                <Grid/>
            </ControlTemplate>
        </ResourceDictionary>
    </DataTemplate.Resources>

    <Border>
    </Border>
</DataTemplate>

DataTemplate _Works.xaml (490 bytes)   
PlatformWindows

Activities

Issue History

Date Modified Username Field Change
2019-04-01 11:18 sckriel New Issue
2019-04-01 11:18 sckriel File Added: DataTemplate_Crashes.xaml
2019-04-01 11:18 sckriel File Added: DataTemplate _Works.xaml
2019-04-05 12:01 sfernandez Assigned To => sfernandez
2019-04-05 12:01 sfernandez Status new => assigned
2019-04-05 12:03 sfernandez Target Version => 2.2.2
2019-04-05 12:03 sfernandez Description Updated
2019-04-05 12:03 sfernandez Steps to Reproduce Updated
2019-04-08 17:52 sfernandez Status assigned => resolved
2019-04-08 17:52 sfernandez Resolution open => fixed
2019-04-08 17:52 sfernandez Fixed in Version => 2.2.2