Skip to content

Commit

Permalink
Use effect drop-shadow instead of BoxShadow for ContentDialog and Tas…
Browse files Browse the repository at this point in the history
…kDialog
  • Loading branch information
amwx committed Oct 12, 2024
1 parent 1dae55f commit 32706e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
xmlns:core="using:FluentAvalonia.Core"
x:CompileBindings="True">
<Design.PreviewWith>
<Border Padding="50">
<!--<ui:ContentDialog Title="Title"
<Border Padding="10">
<ui:ContentDialog Title="Title"
Content="Content goes here"
core:VisualStateHelper.ForcedClassesProperty=":open"/>-->
core:VisualStateHelper.ForcedClassesProperty=":open"/>
</Border>
</Design.PreviewWith>

Expand All @@ -33,8 +33,8 @@
MinHeight="{DynamicResource ContentDialogMinHeight}"
MaxHeight="{DynamicResource ContentDialogMaxHeight}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
BoxShadow="0 8 32 0 #66000000"
VerticalAlignment="Center" Margin="100"
Effect="drop-shadow(0 8 32 #66000000)"
BackgroundSizing="{TemplateBinding BackgroundSizing}">
<!-- Even in WinUI, shadow is always black regardless of light/dark mode -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
<Setter Property="BorderThickness" Value="{DynamicResource TaskDialogBorderWidth}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="BoxShadow" Value="0 8 32 0 #66000000" />
<Setter Property="Effect" Value="drop-shadow(0 8 32 #66000000)" />
</Style>
<Style Selector="^ /template/ Border#HeaderRoot">
<Setter Property="CornerRadius" Value="{Binding Source={StaticResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}}" />
Expand Down

0 comments on commit 32706e1

Please sign in to comment.