ArgumentException when TabViewItem.Header is null or empty string
See original GitHub issueDescribe the bug
ArgumentException
when a TabViewItem
with empty or null Header
displayed.
Steps to reproduce the bug
<TabView>
<TabViewItem Header="">
<TextBlock Text="123" />
<TabViewItem>
<TabView>
or
<TabView>
<TabViewItem Header="{x:Null}">
<TextBlock Text="123" />
<TabViewItem>
<TabView>
or
<TabView>
<TabViewItem>
<TextBlock Text="123" />
<TabViewItem>
<TabView>
Does not reproduce if TabViewItem.Content
is not set, or set to a string instead of a control.
Version Info
NuGet package version:
Microsoft.UI.Xaml 2.4.3 Microsoft.UI.Xaml.2.5.0-prerelease.200923002 Microsoft.WinUI 3.0.0-preview2.200713.0
Windows app type:
UWP | Win32 |
---|---|
Yes | Yes |
Windows 10 version | Saw the problem? |
---|---|
Insider Build (xxxxx) | |
May 2020 Update (19041) | |
November 2019 Update (18363) | Yes |
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 |
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
Should I Throw ArgumentNullException if a string is blank?
ArgumentException should be thrown for the String.Empty case. This would indicate an issue other than it being null.
Read more >Error: Header has an empty/null field
Header has an empty/null field. This causes the import task to fail. Perform one of the following actions to resolve the error by...
Read more >ArgumentException.ThrowIfNullOrEmpty(String ...
The string argument to validate as non- null and non-empty. paramName: String. The name of the parameter with which argument corresponds. Exceptions.
Read more >Xamarin forms templatedview. I'm trying to do a content button ...
Control as null always. var listView = new ListView { ItemsSource = xxx, ItemTemplate = new ... I have tested it on a...
Read more >Cannot set currency to an empty or null string
I'm getting 'ArgumentException: Cannot set currency to an empty or null string' trying to implement codeless IAP.
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
In teaching tip we ended up doing a content presenter who’s content is a border, who’s content is template bound to the property. that way we could put the foreground on the parent content presenter. I think that same model would work here?
That, unfortunately, makes sense. I think you are right and setting the content presenter’s content from code behind makes sense… 😦