Last active
October 17, 2022 10:01
-
-
Save s-fernandez-v/fda4dc90d5927a6c7214b8b0b7a8b666 to your computer and use it in GitHub Desktop.
Background Blur
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Grid x:Name="Layers"> | |
<Grid x:Name="BackgroundPanels"> | |
<Image Source="Landscape.jpg" Stretch="UniformToFill"/> | |
</Grid> | |
<Grid x:Name="BlurredPanel"> | |
<Border HorizontalAlignment="Left" VerticalAlignment="Top" Margin="100,400,0,0"> | |
<Grid> | |
<Border Opacity="0"> | |
<Rectangle x:Name="blur" Width="600" Height="300"> | |
<Rectangle.Fill> | |
<VisualBrush Visual="{Binding ElementName=BackgroundPanels}" ViewboxUnits="Absolute" Viewbox="100,400,600,300"/> | |
</Rectangle.Fill> | |
<Rectangle.Effect> | |
<BlurEffect Radius="20"/> | |
</Rectangle.Effect> | |
</Rectangle> | |
</Border> | |
<Ellipse Width="600" Height="300" Stroke="Black" StrokeThickness="1"> | |
<Ellipse.Fill> | |
<VisualBrush Visual="{Binding ElementName=blur}" ViewboxUnits="Absolute" Viewbox="0,0,600,300"/> | |
</Ellipse.Fill> | |
</Ellipse> | |
<Button Content="Button" HorizontalAlignment="Center" VerticalAlignment="Center"/> | |
</Grid> | |
</Border> | |
</Grid> | |
</Grid> | |
</Grid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment