Slider in WPF using VB.NET

In this article you will learn how to work with Slider control in WPF.
  • 2151

Slider: The Slider is a specialized control that's occasionally useful. This control comes to simplify the process of coding for some UI design cases where you need to let your user choose a value and change it and you update your interface based on user's choices.

The core feature of slider is to displays a WPF slider control in a menu element along with child menu that specify individual values, and the range for the entire slider does not have to be linear. The range is only linear between individual slider tick stops.

The key Slider properties are defined in the RangeBase class. Along with these, you can use all the properties listed below:

  • Orientation

  • Delay and Interval

  • TickPlacement

  • TickFrequency

  • Ticks

  • IsSnapToTickEnabled

  • IsSelectionRangeEnabled

Example of an Slider control

<Window x:Class="ClassicControls.SlidersCompared"
    Title="SlidersCompared" Height="350" Width="450">
        <StackPanel Margin="10">
            <TextBlock Margin="0,15,0,5">A Tick Mark Slider</TextBlock>
            <Slider Maximum="50" Value="15" TickFrequency="5"

Output window



Hope this article help you to understand the working of Slider control in WPF.


More Articles

© 2020 DotNetHeaven. All rights reserved.