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.

TabView doesn't correctly respect OverlayCornerRadius not specified in App.xaml

See original GitHub issue

Describe the bug

Paste the following code into an app:

<muxc:TabView>
    <muxc:TabView.TabItems>
        <muxc:TabViewItem Header="Text">
            <muxc:TabViewItem.Resources>
                <CornerRadius x:Key="OverlayCornerRadius">0,0,0,0</CornerRadius>
            </muxc:TabViewItem.Resources>
        </muxc:TabViewItem>
    </muxc:TabView.TabItems>
</muxc:TabView>

The expected result would be: image

The actual result is:

image

I think this is caused by the fact that bindings inside resources dictionaries/templates are only evaluated once. So overriding the resource inside the app does not have any effect since the binding has already evaluated with the value picked up from the WinUI resources, not the app overriding it.

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Go to ‘…’
  2. Click on ‘…’

Expected behavior

Screenshots

Version Info

NuGet package version:

Windows 10 version Saw the problem?
Insider Build (20185)
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
Xbox
Surface Hub
IoT

Additional context

Pasting the above code into the MuxControlsTestApp yields:

image

which is also not correct in my opinion.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:19 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
chingucodingcommented, Sep 27, 2020

Usually, the OverlayCornerRadius themeresource is shipped with WinUI (see this file). Are you using WinUI and have also added the following reference:

<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
0reactions
github-actions[bot]commented, Jul 29, 2023

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TabView Class - Windows App SDK
The TabView control is a way to display a set of tabs and their respective content. Tab controls are useful for displaying several...
Read more >
WinUI2 XAML Island : Unable to use TabView
Hi,. I'm working with WinUI2 in desktop apps using XAML island. I wanted to use WinUI2's tabview controls. I followed this documentation to ......
Read more >
Tab view not working right on UWP Windows UI Library
After you click at the “+” icon and a tab is created, you could click the tab and the content of Page1 is...
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