WinRTXAMLToolkit Treeview Crash on Window 10

Aug 1, 2015 at 7:40 AM
I have recently upgraded my OS to Windows 10 from Windows 8.1. I'm using VS 2013 With update 4. My app using the treeview control from XAMLToolkit and it works perfectly on Win 8.1 environment. But under Windows 10 it gives me following error. Please help.

This is the XAMLToolkit version I've used: nuget.org/packages/winrtxamltoolkit.windows

Exception message:

System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component. at Windows.UI.Xaml.Controls.ItemsControl.get_ItemTemplate() at WinRTXamlToolkit.Controls.HeaderedItemsControl.PrepareHeaderedItemsControlContainer(HeaderedItemsControl control, Object item, ItemsControl parentItemsControl, Style parentItemContainerStyle) at WinRTXamlToolkit.Controls.HeaderedItemsControl.PrepareHeaderedItemsControlContainerForItemOverride(DependencyObject element, O

Stacktrace:

at Windows.UI.Xaml.Controls.ItemsControl.get_ItemTemplate() at WinRTXamlToolkit.Controls.HeaderedItemsControl.PrepareHeaderedItemsControlContainer(HeaderedItemsControl control, Object item, ItemsControl parentItemsControl, Style parentItemContainerStyle) at WinRTXamlToolkit.Controls.HeaderedItemsControl.PrepareHeaderedItemsControlContainerForItemOverride(DependencyObject element, Object item, ItemsControl parent, Style parentItemContainerStyle) at WinRTXamlToolkit.Controls.TreeView.PrepareContainerForItemOverride(DependencyObject element, Object item) at Windows.UI.Xaml.FrameworkElement.MeasureOverride(Size availableSize)

Inner exception is null
Coordinator
Aug 3, 2015 at 4:38 PM
I'm planning to update the toolkit for Windows 10 soon, but things have been a bit busy around here and I don't even have a working machine now to work on it.
Aug 4, 2015 at 9:45 AM
Thank you.
I will look forward to it.

Sent from Windows Mail

Aug 16, 2015 at 3:47 PM
Hi,
Any update on the new release for Windows 10?
Coordinator
Aug 21, 2015 at 6:45 PM
There's a branch on github that builds

Sent from Outlook




On Fri, Aug 21, 2015 at 11:42 AM -0700, "surensaluka" <[email removed]> wrote:

From: surensaluka

Hi,
Any update on the new release for Windows 10?
Aug 24, 2015 at 9:03 AM
Hi xyzzzer,

Can you provide the link in Github?
and why is not published in NuGet?

Thanks
Coordinator
Aug 24, 2015 at 7:19 PM
https://github.com/xyzzer/WinRTXamlToolkit/tree/Win81_To_UWP

It's not published because it's not finished. Publishing also takes some time.
Sorry, it's a busy summer. I'll get it done eventually.
Sep 29, 2015 at 1:14 PM
Is the branch stable enough to use out of curiosity? Unfortunately we are having this issue and have not been able to work around it.

Thanks,
Coordinator
Oct 15, 2015 at 1:59 AM
I think I found the problem and it should be addressed in the 1.9.4 version that's already pushed to git and nuget.
We need to now set ItemTemplate before ItemsSource on the TreeView control.

Note that this project has now moved from codeplex to github.
https://github.com/xyzzer/WinRTXamlToolkit
Jan 29, 2016 at 1:18 PM
Hi xyzzzer,
I'm bit confused, my app is targeting Windows 8.1 and should work on Win 10 as well. So I've used "WinRT XAML Toolkit for Windows 8.1 1.8.1"
from Nuget

but on Windows 10 it still crashes. Win 8.1 works fine. Here is my XAML code for tree view control. What am I doing wrong here?
           <!--Agenda Tree view-->
                <Grid x:Name="AgendaGrid" Grid.Row="1" KeyDown="AgendaGrid_KeyDown">
                    <controls:TreeView ItemsSource="{Binding TreeItems}" Style="{StaticResource TouchTreeViewStyle}">
                        <controls:TreeView.ItemTemplate>
                            <DataTemplate>
                                <data:DataTemplateExtensions.Hierarchy>
                                    <data:HierarchicalDataTemplate ItemsSource="{Binding Children}" />
                                </data:DataTemplateExtensions.Hierarchy>
                                <Grid>
                                    <!--Heading Item-->                                    
                                           <TextBlock Text="{Binding Name}"
                                              Foreground="{Binding AgendaItemNameColor, Mode=TwoWay}"
                                              FontSize="23" FontWeight="SemiLight" TextWrapping="Wrap"
                                              Margin="0,5" />
                              </Grid>
                            </DataTemplate>
                        </controls:TreeView.ItemTemplate>
                    </controls:TreeView>
Coordinator
Jan 29, 2016 at 1:39 PM
Something strange started happening to the control on 10. Try setting the ItemsSource after the ItemTemplate. I've seen that help.

Sent from Outlook Mobile