microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.35k stars 678 forks source link

The descendant of standard ComboBox loses CornerRadius #4362

Closed alexdi220 closed 3 years ago

alexdi220 commented 3 years ago

Describe the bug Hi, it looks very strange but the inheritor of ComboBox loses CornerRadius

Steps to reproduce the bug

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="10">
        <ComboBox Width="200"/>
        <local:MyComboBox Width="200"/>
</StackPanel>
 public class MyComboBox : ComboBox { }

Expected behavior

Screenshots

image

Version Info

NuGet package version:

[Microsoft.WinUI 3.0.0-preview4.210210.4] If you seeing your issue in older previews, please try preview4.

Windows app type: UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
October 2020 Update (19042) Yes
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

StephenLPeters commented 3 years ago

I think that, because of the way that Winui2 is currently being integrated into winui3, you need to include this in your application.resource or page.resources

    <Style TargetType="MyComboBox" BasedOn="{StaticResource DefaultComboBoxStyle}"/>
StephenLPeters commented 3 years ago

Closing the issue, but if this doesn't work or you want more info just post back here.