in

WPF Design and Development

IdentityMine Team Blogs

Jobi K Joy

A Slider Control in SilverLight

Here is a very basic version of a silverlight Slider control.The implementation is very basic and straight forward, See the screen shot bellow. This has been implemented as a user control with a Canvas and a rectangle. The rectangle is the Slider Thumb and canvas works as the track as well as the root element. The thump has its mouse properties subscribed ( MouseLeftButtonDown="down" MouseLeftButtonUp="up" MouseMove="move") and that gives the drag and move behaviour to the thumb horizontally. Current implementation can give you the fraction of the thump position to the total width of the slider See the source code here . A simple hack can convert the same code to a vertically aligned slider.

Published Aug 29 2007, 11:44 PM by jobi

Comments

No Comments
© 2007 IdentityMine, Inc.
Powered by Community Server (Commercial Edition), by Telligent Systems