AvaloniaUtils / DialogHost.Avalonia

AvaloniaUI control that provides a simple way to display a dialog with information or prompt the user when information is needed
MIT License
228 stars 15 forks source link

Add shadow effect and custom corner radius #3

Closed unofficialdev closed 2 years ago

unofficialdev commented 2 years ago

consider add shadow effect and custom corner radius. The shadow effect makes the dialog appear taller than the owner content.

SKProCH commented 2 years ago

You can customize DialogContentTemplate by yourself, here's default template:

<Style Selector="dialogHost|DialogHost">
    <Setter Property="PopupTemplate">
        <ControlTemplate>
            <VisualLayerManager IsPopup="True" Name="PART_DialogPopupRoot">
                <Border Name="PART_ContentBackground" CornerRadius="2">
                    <ContentPresenter Name="PART_ContentPresenter"
                                      Background="{TemplateBinding Background}"
                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                      Content="{TemplateBinding Content}"
                                      Padding="{TemplateBinding Padding}" />
                </Border>
            </VisualLayerManager>
        </ControlTemplate>
    </Setter>
</Style>
SKProCH commented 2 years ago

Hello, @unofficialdev I implemented it in new 0.3.0 version:

SKProCH commented 2 years ago

Released v0.3.0