TickPlacement and TickFrequency for Slider : Slider « Windows Presentation Foundation « C# / CSharp Tutorial






<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>
WPF Tick Placement And Tick Frequency For Slider








24.26.Slider
24.26.1.Normal Slider (Max=100, Val=10)Normal Slider (Max=100, Val=10)
24.26.2.A Delay of 0 and Interval of 1 make this a fast slider.A Delay of 0 and Interval of 1 make this a fast slider.
24.26.3.Vertical/Horizontal SliderVertical/Horizontal Slider
24.26.4.TickPlacement and TickFrequency for SliderTickPlacement and TickFrequency for Slider
24.26.5.Set Minimun/Maximum value for SliderSet Minimun/Maximum value for Slider
24.26.6.Add a slider control and a border control to the content of the StackPanel, and add a canvas to the border control.Add a slider control and a border control to the content of the StackPanel, and add a canvas to the border control.
24.26.7.Slider AttributesSlider Attributes
24.26.8.Get User Input from a SliderGet User Input from a Slider
24.26.9.Slider value changed eventSlider value changed event