Skip to content

feat(DrawerHost): add CornerRadius property - #4096

Open
corvinsz wants to merge 1 commit into
MaterialDesignInXAML:masterfrom
corvinsz:fix/3412
Open

corvinsz wants to merge 1 commit 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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant