why there is shadow in ExpanderHeader when Expander is Expanded?

Viewed 47

When the Expander is not Expanded

not Expanded

When it Expanded, shadow is appeared, but the Shadow property is null both in ExpanderHeader and ExpanderContent

Expanded

Where can I configure or disable this shadow?

The version of WinUI I am using is:

<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-preview3" />

update: I found that as long as the Expander's CornerRadius is 0, there is no shadow in header. But any other value of CornerRadius will bring the shadow to the header

set CornerRadius to 0 and 5

update2:I found that the shadow seems to come from the button control, if you create button and set there CornerRadius like this:

<Button CornerRadius="5,0,0,5" Content="TestButtonShadow" Background="Green"/>
<Button CornerRadius="0,5,5,0" Content="TestButtonShadow" Background="Green"/>
<Button CornerRadius="0,5,0,5" Content="TestButtonShadow" Background="Green"/>
<Button CornerRadius="5,0,5,0" Content="TestButtonShadow" Background="Green"/>
<Button CornerRadius="0,0,5,5" Content="TestButtonShadow" Background="Green"/>
<Button CornerRadius="5,5,0,0" Content="TestButtonShadow" Background="Green"/>

and the button will looks like:

enter image description here

why?

0 Answers
Related