Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7192

Why XAML crashing while resizing an specific page in UWP?

$
0
0

my app has 4 pages. But when I'm trying to resize a specific page (setting page in my app), XAML is crashing and throwing an unhandled exception -

#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
            UnhandledException += (sender, e) =>
            {
                if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
            };
#endif

I'm facing this problem after I added this into my ComboBox -

<ComboBox.ItemTemplate>
    <DataTemplate x:DataType="data:Depertment">
        <TextBlock Text="{x:Bind Dept}"/>
    </DataTemplate>
</ComboBox.ItemTemplate>

Full ComboBox Code

<ComboBox Header="Select The Dept."
          ItemsSource="{x:Bind deptList}"
          x:Name="deptNameCombo"
          Margin="2"
          SelectionChanged="deptNameCombo_SelectionChanged"
          MinWidth="200">
    <ComboBox.ItemTemplate>
        <DataTemplate x:DataType="data:Depertment">
            <TextBlock Text="{x:Bind Dept}"/>
        </DataTemplate>
    </ComboBox.ItemTemplate>
</ComboBox>

But if I resize the app while navigating another page and move back to the setting page nothing happens, but if I want to resize the app again while I'm in the setting page, it crashes usually.

What is causing this? Can anyone help?

Thanks.


Viewing all articles
Browse latest Browse all 7192

Trending Articles