Glowing Effect with OuterGlowBitmapEffect

image_pdfimage_print


   
 

<Window x:Class="BitmapEffectsExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Bitmap Effects" Height="500" Width="400">
    <StackPanel Margin="5,20,5,5" Grid.Column="0" Grid.Row="1">
      <Button Content="A Growing Button" Width="150" Height="30" Margin="10">
        <Button.BitmapEffect>
          <OuterGlowBitmapEffect GlowColor="Gray"
            GlowSize="15" Noise="1" />
        </Button.BitmapEffect>
      </Button>
      <TextBlock Text="Growing" FontSize="40" FontWeight="Bold"
        Foreground="White" Margin="5">
        <TextBlock.BitmapEffect>
          <OuterGlowBitmapEffect GlowColor="Gray"
            GlowSize="10" Noise="0.5" />
        </TextBlock.BitmapEffect>
      </TextBlock>
    </StackPanel>

</Window>

   
     


Blur Effect with BlurBitmapEffect

image_pdfimage_print


   
 

<Window x:Class="BitmapEffectsExample"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Bitmap Effects" Height="500" Width="400">
    <!-- : -->
    <StackPanel Margin="5" Grid.Column="1" Grid.Row="0">
      <Button Content="A Blur Button" Width="175" Height="50"
        Margin="5">
        <Button.BitmapEffect>
          <BlurBitmapEffect Radius="1" />
        </Button.BitmapEffect>
      </Button>
      <Button Content="A Blur Button" Width="175" Height="50"
        Margin="5">
        <Button.BitmapEffect>
          <BlurBitmapEffect Radius="3" />
        </Button.BitmapEffect>
      </Button>
    </StackPanel>

</Window>

   
     


Create a shadow effect for displayed text.

image_pdfimage_print


   
 

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.Window1" Title="Text Shadow Samples"
  Background="FloralWhite">
  <StackPanel>
      <TextBlock FontSize="64" Text="Shadow Text" Foreground="Teal">
        <TextBlock.BitmapEffect>
          <DropShadowBitmapEffect ShadowDepth="6" Direction="330" Color="Black" Opacity="0.5" Softness="0.25" />
        </TextBlock.BitmapEffect>
      </TextBlock>
  </StackPanel>
</Window>

   
     


Hard single shadow

image_pdfimage_print


   
 


<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.Window1" Title="Text Shadow Samples"
  Background="FloralWhite">
  <StackPanel>
      <TextBlock
        FontSize="64"
        Text="asdf"
        Foreground="Maroon"
        Grid.Column="1" Grid.Row="1">
        <TextBlock.BitmapEffect>
          <DropShadowBitmapEffect
            ShadowDepth="6"
            Direction="135"
            Color="Maroon"
            Opacity="0.35"
            Softness="0.0" />
        </TextBlock.BitmapEffect>
      </TextBlock>


  </StackPanel>
</Window>

   
     


Hard shadow on top of soft shadow

image_pdfimage_print


   
 


<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.Window1" Title="Text Shadow Samples"
  Background="FloralWhite">
  <StackPanel>

      <TextBlock FontSize="64" Text="asdf" Foreground="Yellow">
        <TextBlock.BitmapEffect>
          <BitmapEffectGroup>
            <DropShadowBitmapEffect ShadowDepth="5" Direction="330" Color="Orange"
              Opacity="0.75"
              Softness="0.50" />
            <DropShadowBitmapEffect
              ShadowDepth="2"
              Direction="330"
              Color="Red"
              Opacity="0.5"
              Softness="0.0" />
          </BitmapEffectGroup>
        </TextBlock.BitmapEffect>
      </TextBlock>


  </StackPanel>
</Window>

   
     


Hard shadow on top of noisy shadow

image_pdfimage_print


   
 


<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.Window1" Title="Text Shadow Samples"
  Background="FloralWhite">
  <StackPanel>

      <TextBlock FontSize="64"
        Text="asdf"
        Foreground="Silver"
        Grid.Column="1" Grid.Row="3">
        <TextBlock.BitmapEffect>
          <BitmapEffectGroup>
            <DropShadowBitmapEffect
              ShadowDepth="3"
              Direction="330"
              Color="Black"
              Opacity="0.75"
              Softness="0.0" />
            <DropShadowBitmapEffect
              Noise="0.75"
              ShadowDepth="6"
              Direction="330"
              Color="Black"
              Opacity="0.35"
              Softness="0.25" />
          </BitmapEffectGroup>
        </TextBlock.BitmapEffect>
      </TextBlock>


  </StackPanel>
</Window>

   
     


Shadow effect by creating an outer glow

image_pdfimage_print


   
 

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.Window1" Title="Text Shadow Samples"
  Background="FloralWhite">
  <StackPanel>

      <TextBlock FontSize="64" Text="{Binding Path=Text, ElementName=textblockMaster}"
        Foreground="SteelBlue" Grid.Column="1" Grid.Row="4">
        <TextBlock.BitmapEffect>
          <OuterGlowBitmapEffect
            GlowSize="1.0"
            GlowColor="Orange"
            Opacity="1.0"/>
        </TextBlock.BitmapEffect>
      </TextBlock>

  </StackPanel>
</Window>