Skip to content

Instantly share code, notes, and snippets.

@s-fernandez-v
Last active September 20, 2023 15:36
Show Gist options
  • Save s-fernandez-v/f0d6a9705d92ce5a25361ed654d19c7e to your computer and use it in GitHub Desktop.
Save s-fernandez-v/f0d6a9705d92ce5a25361ed654d19c7e to your computer and use it in GitHub Desktop.
Blur Edges
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.Resources>
<BitmapImage x:Key="imgSrc" UriSource="Landscape.jpg"/>
</Grid.Resources>
<Image x:Name="img" Source="{StaticResource imgSrc}"/>
<Rectangle Fill="DarkOliveGreen" Opacity="{Binding Value, ElementName=op}"/>
<Image Source="{StaticResource imgSrc}">
<Image.Effect>
<BlurEffect Radius="{Binding Value, ElementName=br}"/>
</Image.Effect>
</Image>
<Slider x:Name="op" Value="1" Minimum="0" Maximum="1" Width="400" VerticalAlignment="Top" Margin="20"/>
<Slider x:Name="br" Value="1" Minimum="0" Maximum="200" Width="400" VerticalAlignment="Top" Margin="50"/>
</Grid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment