Use Slider to control the Bevel


   
    

<Window x:Class="BitmapEffects.Window4"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Bitmap Effects" Height="538" Width="600">
    <StackPanel>
    <Rectangle Height="50" Width="200" Fill="Red" Stroke="Black">
        <Rectangle.BitmapEffect>
            <BevelBitmapEffect 
            BevelWidth="{Binding ElementName=sliderBevel, Path=Value}"
              />
        </Rectangle.BitmapEffect>
    </Rectangle>
    <Slider Minimum="0" Maximum="20" Name="sliderBevel" Value="14"/>
    <TextBox Text="{Binding ElementName=sliderBevel, Path=Value}"/>
     </StackPanel>
</Window>

   
    
    
    
     


Use Slider to control the Glow


   
    
<Window x:Class="BitmapEffects.Window4"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Bitmap Effects" Height="538" Width="600"
  >
    <StackPanel>
        <Canvas>
            <Ellipse Height="100" Width="100" Fill="Blue" Stroke="Black"/>
            <Canvas.BitmapEffect>
                <OuterGlowBitmapEffect 
            GlowSize="{Binding Path=Value, ElementName=sliderGlow}"
              />
            </Canvas.BitmapEffect>
        </Canvas>
        <TextBlock>Outer Glow</TextBlock>
        <Slider Minimum="0" Maximum="20" Name="sliderGlow" Value="14"/>
        <TextBox Text="{Binding ElementName=sliderGlow, Path=Value}"/>


    </StackPanel>
</Window>

   
    
    
    
     


Use Slider to control the Emboss


   
    

<Window x:Class="BitmapEffects.Window4"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Bitmap Effects" Height="538" Width="600"
  >
    <StackPanel>
        <Border Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" 
      Width="300" Height="150">
            <Border.BitmapEffect>
                <EmbossBitmapEffect 
          Relief="{Binding Path=Value, ElementName=sliderEmboss}"
            />
            </Border.BitmapEffect>
            <TextBlock Foreground="White" FontSize="18">EMBOSS</TextBlock>
        </Border>
        <Slider Minimum="0" Maximum="1" Name="sliderEmboss" Value=".5" 
        TickFrequency=".1"/>
        <TextBox Text="{Binding ElementName=sliderEmboss, Path=Value}"/>



    </StackPanel>
</Window>

   
    
    
    
     


Use Slider to control Drop Shadow


   
    
<Window x:Class="BitmapEffects.Window4"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Bitmap Effects" Height="538" Width="600"
  >
    <StackPanel>
        <Rectangle Height="50" Width="200" Fill="White" Stroke="Black">
            <Rectangle.BitmapEffect>
                <DropShadowBitmapEffect 
            ShadowDepth="{Binding Path=Value, ElementName=sliderDrop}" 
              />
            </Rectangle.BitmapEffect>
        </Rectangle>
        <Slider Minimum="0" Maximum="10" Name="sliderDrop" Value="14"/>
        <TextBox Text="{Binding ElementName=sliderDrop, Path=Value}"/>


    </StackPanel>
</Window>

   
    
    
    
     


Use Slider to control the Blur


   
    
<Window x:Class="BitmapEffects.Window4"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Bitmap Effects" Height="538" Width="600"
  >
    <StackPanel>
        <Ellipse Height="100" Width="100" Fill="Red" Stroke="Black">
            <Ellipse.BitmapEffect>
                <BlurBitmapEffect 
            Radius="{Binding Path=Value, ElementName=sliderBlur}"
              />
            </Ellipse.BitmapEffect>
        </Ellipse>
        <TextBlock>Blur</TextBlock>
        <Slider Minimum="0" Maximum="10" Name="sliderBlur" Value="14"/>
        <TextBox Text="{Binding ElementName=sliderBlur, Path=Value}"/>

    </StackPanel>
</Window>

   
    
    
    
     


Bind Slider value to TextBlock


   
    



<Window  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="SDKSample.Pane1">

    <StackPanel>
      <TextBlock Margin="0,10,0,0"  Foreground="Blue">
      <TextBlock Text="(Height,Width) = "/>
      <TextBlock Text="{Binding ElementName=RectangleHeight,Path=Value}"/>
      ,
      <TextBlock Text="{Binding ElementName=RectangleWidth,Path=Value}"/>
    </TextBlock>

    <TextBlock Margin="10,10,0,0">Height</TextBlock>
    <Slider Name="RectangleHeight"  Margin="10, 0, 0, 0" 
      Width="100" Orientation="Horizontal" HorizontalAlignment="Left" 
      Value="50" Minimum="0" Maximum="200" 
      SmallChange="1" LargeChange="10"
      TickPlacement="BottomRight" TickFrequency="10"/>
    <TextBlock Margin="10,0,0,0">Width</TextBlock>
    <Slider Name="RectangleWidth" Margin="10, 0, 0, 0" 
      Width="100" Orientation="Horizontal" HorizontalAlignment="Left" 
      Value="50" Minimum="0" Maximum="200"
      SmallChange="1" LargeChange="10"
      TickPlacement="BottomRight" TickFrequency="10"/>
        <Rectangle Fill="Blue" HorizontalAlignment="Left" 
               Margin="50,20,0,0" 
               Height="{Binding ElementName=RectangleHeight,Path=Value}" 
               Width="{Binding ElementName=RectangleWidth,Path=Value}"/>
    </StackPanel>

</Window>
  

   
    
    
    
     


Use Slider to control the Transformation


   
    


<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Label Content="Angle" />
    <ScrollBar Name="angle" Orientation="Horizontal" Value="0" Minimum="0" Maximum="360" />
    <TextBlock HorizontalAlignment="Center" Text="{Binding ElementName=angle, Path=Value}" />

    <Label Content="CenterX" />
    <ScrollBar Name="xcenter" Orientation="Horizontal" Value="0" Minimum="-100" Maximum="100" /> 
    <TextBlock HorizontalAlignment="Center" Margin="12" Text="{Binding ElementName=xcenter, Path=Value}" />

    <Label Content="CenterY" />
    <ScrollBar Name="ycenter" Orientation="Horizontal" Value="0" Minimum="-100" Maximum="100" />
    <TextBlock HorizontalAlignment="Center" Margin="12" Text="{Binding ElementName=ycenter, Path=Value}" />

    <Canvas>

        <Button Name="btn" Content="Button" Canvas.Left="100" Canvas.Top="100">
            <Button.RenderTransform>
                <RotateTransform
                    Angle="{Binding ElementName=angle, Path=Value}"
                    CenterX="{Binding ElementName=xcenter, Path=Value}"
                    CenterY="{Binding ElementName=ycenter, Path=Value}" />
            </Button.RenderTransform>
        </Button>

        <StackPanel>
            <TextBlock Text="{Binding ElementName=btn, Path=ActualWidth}" />
            <TextBlock Text="::" />
            <TextBlock Text="{Binding ElementName=btn, Path=ActualHeight}" />
        </StackPanel>
    </Canvas>
</StackPanel>