microsoft-ui-xaml: TabView doesn't correctly respect OverlayCornerRadius not specified in App.xaml

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.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 3
  • Comments: 19 (6 by maintainers)

Most upvoted comments

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"/>