Vertical/Horizontal Slider


   
    
<Window x:Class="SimpleStyles.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="SimpleStyles"
  Background="#F8F8F8">
  <ScrollViewer>
    <WrapPanel>
      <HeaderedItemsControl Header="Slider">
        <StackPanel>
          <Slider Margin="8" Orientation="Horizontal" />
          <Slider Margin="8" Orientation="Horizontal" TickPlacement="TopLeft" />
          <Slider Margin="8" Orientation="Horizontal" TickPlacement="BottomRight" />
          <Slider Margin="8" Orientation="Horizontal" TickPlacement="Both" TickFrequency="2" />
        </StackPanel>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
          <Slider Margin="8" Orientation="Vertical" />
          <Slider Margin="8" Orientation="Vertical" TickPlacement="TopLeft" />
          <Slider Margin="8" Orientation="Vertical" TickPlacement="BottomRight" />
          <Slider Margin="8" Orientation="Vertical" TickPlacement="Both" TickFrequency="2" />
        </StackPanel>
      </HeaderedItemsControl>
   
    </WrapPanel>
  </ScrollViewer>
</Window>

   
    
    
    
     


TickPlacement and TickFrequency for Slider

   
    

<Window x:Class="SimpleStyles.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="SimpleStyles"
  Background="#F8F8F8">
  <ScrollViewer>
    <WrapPanel>
      <!-- Slider -->
      <HeaderedItemsControl Style="{StaticResource HorizontalHIC}" Header="Slider">
        <StackPanel>
          <Slider Margin="8" Orientation="Horizontal" />
          <Slider Margin="8" Orientation="Horizontal" TickPlacement="TopLeft" />
          <Slider Margin="8" Orientation="Horizontal" TickPlacement="BottomRight" />
          <Slider Margin="8" Orientation="Horizontal" TickPlacement="Both" TickFrequency="2" />
        </StackPanel>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top">
          <Slider Margin="8" Orientation="Vertical" />
          <Slider Margin="8" Orientation="Vertical" TickPlacement="TopLeft" />
          <Slider Margin="8" Orientation="Vertical" TickPlacement="BottomRight" />
          <Slider Margin="8" Orientation="Vertical" TickPlacement="Both" TickFrequency="2" />
        </StackPanel>
      </HeaderedItemsControl>
   
    </WrapPanel>
  </ScrollViewer>
</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 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 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 TranslateTransform


   
    

<StackPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Label Content="X" />
    <ScrollBar Name="xscroll" Orientation="Horizontal" Minimum="-300" Maximum="1000" />
    <TextBlock HorizontalAlignment="Center" Text="{Binding ElementName=xscroll, Path=Value}" />

    <Label Content="Y" />
    <ScrollBar Name="yscroll" Orientation="Horizontal" Minimum="-300" Maximum="1000" />
    <TextBlock HorizontalAlignment="Center" Text="{Binding ElementName=yscroll, Path=Value}" />

    <Canvas>
        <Button Content="Button" Canvas.Left="100" Canvas.Top="100">
            <Button.RenderTransform>
                <TranslateTransform 
                    X="{Binding ElementName=xscroll, Path=Value}"
                    Y="{Binding ElementName=yscroll, Path=Value}" />
            </Button.RenderTransform>
        </Button>
    </Canvas>
</StackPanel>

   
    
    
    
     


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>