I'm writing an app for UWP using C# and have come across a strange error that I can't seem to fix. When I put an AppBarButton inside an ItemsControl and click it, it causes an error.
This happens whether I bind the AppBarButton or put it in manually. This happens even if I put it in a clean Custom Control. It doesn't happen if I don't put the ItemsControl inside a Custom Control. It also doesn't happen if I put the AppBarButton inside a StackPanel or a Listview.
Here is the error I get: In a popup box:
Unhandled exception at 0x00007FFBFF3BCE8B (Windows.UI.Xaml.dll) in TorahScrollMVVM.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000002A44F259E30, 0x0000000000000001).
My XAML is simply:
<Style TargetType="controls:CustomControl1">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:CustomControl1">
<ItemsControl>
<AppBarButton Icon="Target"/>
</ItemsControl>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Anyone have any idea what is happening?
Thanks
User contributions licensed under CC BY-SA 3.0