- Thread starter
- Admin
- #391
I had introduced a new popup dialog style by applying a blur to a blurred picture The result is visually attractive, just one problem is remaining and I try to solve it currently.
In case the dialog window is very long, the blur effect is not stretched well (See screenshots).
Current code for the blur:
I tried to devide the blur picture into 3 pieces, while only the middle piece is stretched vertically and all pieces are stretched horizontally.
The blur effect is applied to the grid in the end. This would make the rounding of the blur aspect indedendent and it should look better.
However the result is always following:
The pictures are not stretched correctly
Here the code:
Does anyone have an idea?
In case the dialog window is very long, the blur effect is not stretched well (See screenshots).
Current code for the blur:
HTML:
<Rectangle Fill="{ThemeResource DialogBorderBrush}" RadiusY="{ThemeResource DialogBorderCornerRadius}" RadiusX="{ThemeResource DialogBorderCornerRadius}"
Margin="-120,-85,-120,-80" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Opacity="0.9">
<Rectangle.Fill>
<ImageBrush ImageSource="blur.png" Stretch="Fill"/>
</Rectangle.Fill>
<Rectangle.Effect>
<ZoomBlurEffect BlurAmount="0.1" />
</Rectangle.Effect>
</Rectangle>
I tried to devide the blur picture into 3 pieces, while only the middle piece is stretched vertically and all pieces are stretched horizontally.
The blur effect is applied to the grid in the end. This would make the rounding of the blur aspect indedendent and it should look better.
However the result is always following:
The pictures are not stretched correctly
Here the code:
HTML:
<Grid Margin="-180,-85,-180,-80" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Row="0" Source="blur_top.png" HorizontalAlignment="Stretch" Opacity="0.9"/>
<Image Grid.Row="1" Source="blur_mid.png" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Opacity="0.9" />
<Image Grid.Row="2" Source="blur_bot.png" HorizontalAlignment="Stretch" Opacity="0.9"/>
<Grid.Effect>
<ZoomBlurEffect BlurAmount="0.1" />
</Grid.Effect>
</Grid>
Does anyone have an idea?