Value Selection with the Slider Control

The Slider control provides a selector you can use to set a particular value that is bound to another control. Chapter 31 provides an example binding a Slider to a MediaElement for controlling the volume; however, at the moment consider the following code:

<Slider Name="Slider1"        Maximum="10" Minimum="0" Value="5"        AutoToolTipPlacement="BottomRight"        TickPlacement="TopLeft" TickFrequency="1"        /><TextBlock Text="{Binding ElementName=Slider1,           Path=Value}"/>

A Slider requires a Minimum and Maximum value, whereas Value is the current selected value. You can place ToolTips reporting the value (AutoToolTipPlacement) that specify the position (TopLeft ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.