TabViewItem without header set causes crash
See original GitHub issueDescribe the bug
The following code will cause a crash on launch:
<muxc:TabView x:Name="rootTabView">
<muxc:TabView.TabItems>
<muxc:TabViewItem>
<!--<muxc:TabViewItem.Header>
<TextBlock Text="Without me, you'll crash" />
</muxc:TabViewItem.Header>-->
<muxc:TabViewItem.Content>
<Button Content="I should be in the content area" />
</muxc:TabViewItem.Content>
</muxc:TabViewItem>
</muxc:TabView.TabItems>
</muxc:TabView>
Uncommenting out the Header set will avoid the crash. Having a Header should not be a hard requirement for TabViewItem; it should render blank if not set.
Steps to reproduce the bug
Steps to reproduce the behavior: See above markup.
The error is cryptic:
Expected behavior
No crash.
Screenshots
Version Info
NuGet package version:
[Microsoft.UI.Xaml 2.6.1] - latest stable
Windows version | Saw the problem? |
---|---|
Insider Build (22000) | Yes |
October 2020 Update (19042) | |
May 2020 Update (19041) | |
November 2019 Update (18363) | |
May 2019 Update (18362) | |
October 2018 Update (17763) | |
April 2018 Update (17134) | |
Fall Creators Update (16299) | |
Creators Update (15063) |
Device form factor | Saw the problem? |
---|---|
Desktop | Yes |
Xbox | |
Surface Hub | |
IoT |
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
winui3 tabviewitem without set Header causes wrong #8760
If I do not set the Header of TabViewItem and only set the Content, the Content will appear in the Header position or...
Read more >TabView : issue with TabViewItems
Hello, We are experiencing some unexpected crashes while working with TabView. Our goal is to hide first tab when it's not needed anymore....
Read more >iOS 15 More Tab Crash | Apple Developer Forums
Hello,. The app I'm working on crashes by trying to reference a deallocated object. The object is a subclass of UITabBarController, and this...
Read more >Android, crashes when nested inside a tabview
I receive the following error when I use a Side Drawer inside a tab view. When you initially navigate to the tab everything...
Read more >UITableView : crash when adding a section footer view in ...
The UITableView looks good when filled with rows, but looks pretty ugly when there is none (the 2 header sections are stuck together...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
(not to help triage your repo or anything, but with #3426 merged, should this one be closed too?)
The PR @StephenLPeters linked looks good to me and ready to merge.