Skip to content

feat(DrawerHost): add CornerRadius property - #4096

Merged
Keboo merged 2 commits into
MaterialDesignInXAML:masterfrom
corvinsz:fix/3412
Sep 25, 2026
Merged

Keboo merged 2 commits into
MaterialDesignInXAML:masterfrom
corvinsz:fix/3412

Conversation

@corvinsz

Copy link
Copy Markdown
Member

fixes #3412

Added a CornerRadius dependency property to DrawerHost and updated the control template so the overlay (PART_ContentCover) is a Border with CornerRadius="{TemplateBinding CornerRadius}".

This gives consumers the experience as with the DialogHost - controlling the overlay's corner-radius with the CornerRadius property on the control (DrawerHost/DialogHost).

minimal repro:

<materialDesign:DrawerHost CornerRadius="32"
                           LeftDrawerCornerRadius="32 0 0 32"
                           OverlayBackground="Red">
  <materialDesign:DrawerHost.LeftDrawerContent>
    <Button HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Command="{x:Static materialDesign:DrawerHost.CloseDrawerCommand}"
            CommandParameter="{x:Static Dock.Left}"
            Content="Close" />
  </materialDesign:DrawerHost.LeftDrawerContent>

  <Button Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}"
          CommandParameter="{x:Static Dock.Left}"
          Content="left" />
</materialDesign:DrawerHost>

Before

image

After

image

@Keboo Keboo added this to the 5.4.0 milestone Sep 25, 2026
@Keboo Keboo added enhancement release notes Items are likely to be highlighted in the release notes. labels Sep 25, 2026
@Keboo
Keboo enabled auto-merge (squash) September 25, 2026 04:55
@Keboo
Keboo merged commit 846580a into MaterialDesignInXAML:master Sep 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement release notes Items are likely to be highlighted in the release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DrawerHost Set LeftDrawerCornerRadius, IsLeftDrawerOpen is true, OverlayBackground not set CornerRadius.

2 participants