In WPF, there are a number of effects we can add on top of UI like drop shadows, glows, blurs and more using Bitmap Effects. Adding Bitmap Effects is VERY easy. Below is an example of some bitmap effects applied to a button.
Here i'm using Grid layout of 3*3 for better understanding.
<Window x:Class="TestWPF.BitmapEffectWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BitmapEffectWindow" Height="300" Width="300">
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Background" Value="White"/>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="DropShadow" Height="25" Grid.ColumnSpan="2" Margin="0,31,90,31" Background="#FFD64848">
<Button.BitmapEffect>
<DropShadowBitmapEffect ShadowDepth="25"/>
</Button.BitmapEffect>
</Button>
<Button Content="OuterGlow" Height="25" Width="95" Grid.Column="1" Grid.Row="0" >
<Button.BitmapEffect>
<OuterGlowBitmapEffect GlowColor="Red" GlowSize="25"/>
<Button.BitmapEffect>
</Button>
<Button Content="Blur" Height="25" Width="95" Grid.Column="0" Grid.Row="2" Background="#FF2D39F3">
<Button.BitmapEffect>
<BlurBitmapEffect Radius="5" KernelType="Box"/>
<Button.BitmapEffect>
</Button>
<Button FontSize="38" FontWeight="Bold" Foreground="Gray" Grid.Row="1" Grid.ColumnSpan="3">
<Button Content>Emboss</Button Content>
<Button.BitmapEffect>
<EmbossBitmapEffect></EmbossBitmapEffect>
<Button.BitmapEffect>
</Button>
<Button Content="Bevel" Height="25" Width="95" Grid.Column="2" Grid.Row="0" Background="#FFE7B3DB">
<Button.BitmapEffect>
<BevelBitmapEffect Relief="10" BevelWidth="20" Smoothness="500"/>
<Button.BitmapEffect>
<Button>
<Button Content="Group" Height="25" Width="95" Grid.Column="2" Grid.Row="2" Background="#FFEE95EE">
<Button.BitmapEffect>
<BitmapEffectGroup/>
<Button.BitmapEffect>
<Button>
</Grid>
</Window>
This is all about bitmap effects that we can apply for better look and feel of controls.
Here i'm using Grid layout of 3*3 for better understanding.
<Window x:Class="TestWPF.BitmapEffectWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="BitmapEffectWindow" Height="300" Width="300">
<Window.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Background" Value="White"/>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Content="DropShadow" Height="25" Grid.ColumnSpan="2" Margin="0,31,90,31" Background="#FFD64848">
<Button.BitmapEffect>
<DropShadowBitmapEffect ShadowDepth="25"/>
</Button.BitmapEffect>
</Button>
<Button Content="OuterGlow" Height="25" Width="95" Grid.Column="1" Grid.Row="0" >
<Button.BitmapEffect>
<OuterGlowBitmapEffect GlowColor="Red" GlowSize="25"/>
<Button.BitmapEffect>
</Button>
<Button Content="Blur" Height="25" Width="95" Grid.Column="0" Grid.Row="2" Background="#FF2D39F3">
<Button.BitmapEffect>
<BlurBitmapEffect Radius="5" KernelType="Box"/>
<Button.BitmapEffect>
</Button>
<Button FontSize="38" FontWeight="Bold" Foreground="Gray" Grid.Row="1" Grid.ColumnSpan="3">
<Button Content>Emboss</Button Content>
<Button.BitmapEffect>
<EmbossBitmapEffect></EmbossBitmapEffect>
<Button.BitmapEffect>
</Button>
<Button Content="Bevel" Height="25" Width="95" Grid.Column="2" Grid.Row="0" Background="#FFE7B3DB">
<Button.BitmapEffect>
<BevelBitmapEffect Relief="10" BevelWidth="20" Smoothness="500"/>
<Button.BitmapEffect>
<Button>
<Button Content="Group" Height="25" Width="95" Grid.Column="2" Grid.Row="2" Background="#FFEE95EE">
<Button.BitmapEffect>
<BitmapEffectGroup/>
<Button.BitmapEffect>
<Button>
</Grid>
</Window>
This is all about bitmap effects that we can apply for better look and feel of controls.