question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TabViewItem without header set causes crash

See original GitHub issue

Describe 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: image

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:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zadjii-msftcommented, Oct 26, 2021

(not to help triage your repo or anything, but with #3426 merged, should this one be closed too?)

0reactions
chingucodingcommented, Aug 4, 2021

The PR @StephenLPeters linked looks good to me and ready to merge.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found