Thursday, November 20, 2008
Trusted by over 7 million customers!
RTLScrollbar - Version 1.1 - Silverlight Scrollbar with Mouse Wheel Support
Minimize
Location: BlogsSilverlight Code & Controls   
Posted by: Ken Dopierala Jr.11/20/2007 10:25 PM
*Update - Firefox - Opera Mouse Wheel Support Added. *Update - Mousewheel Support Included. The latest Silverlight scrollbars have a lot of new features: Horizontal Scrollbar Support Three & Six Digit Hex Colors Supported Scrollbar Can Be Set To Disable or Hide If Not Needed MUCH Smoother/Graceful User Experience Buttons, Track, & Grip/Thumb Can All Be Resized (no code required)

 *Update - 11/19/2007 - Fixed calculation bug that occurs when dragging the grip and then switching to using the arrow buttons.

*Update - 10/03/2007 - Firefox - Opera Mouse Wheel Support Added
The Javascript has been edited to handle Firefox Mouse Wheel Support and Opera Mouse Wheel Support.  As with IE the scroll bars will only respond if the mouse is over the content area and the content is long enough to need scrolling.

*Update - 10/03/2007 - Mouse Wheel Support Added
Mouse wheel support has been added to the RTL Silverlight scrollbar.  I'll be adding a new blog entry soon about how to add this support to any of your Managed Code controls without adding a ton of Javascript.

The latest Silverlight scrollbars have a lot of new features:

  • Horizontal Scrollbar Support
  • Three & Six Digit Hex Colors Supported
  • Scrollbar Can Be Set To Disable  or Hide If Not Needed
  • MUCH Smoother/Graceful User Experience
  • Buttons, Track, & Grip/Thumb Can All Be Resized (no code required)

The link to the example and code are at the bottom.

The Horizontal support is easy to add, simply add a property to the XAML creating the bar (IsVerticle="False").  Likewise the new NotUsedOption property can be set to "hidden" or "disabled".  When hidden the scrollbar will completely disappear, when disabled the thumb/grip will disappear and the up/down arrow buttons will be inactive.

You do not need to tell the RTLScrollbar when to activate - it will detect this based on the canvas/textbox object combo you assign it to.

The smoother scrolling resulted from the addition of the TopParent property.  By setting this property to the name of your applications parent canvas the RTLScrollbar can detect mouse movements even when you aren't over it.  So dragging the grip will not stop working when you move off the control as it did before.  In addition if you click on an arrow button, move off it, then move back on without unclicking the control will continue to scroll.  Same with clicking somewhere on the track.

The previous version was limited to 6 digit hex codes for color, version 1.1 of the RTLScrollbar can handle 3 digit hex codes as well.

I'm looking into making events fire for Javascript only coders as well as turning the control into a slider.  If you have any other suggestions let me know.

I'd really like to give coders the ability to change the scrollbar look without having to change the XAML.  If anyone knows an easy way to let coders inject XAML snippets (i.e. Rectangle, GradientBrush, etc) and not an entire canvas, please let me know!

You can view a demo and download the source here: http://www.RealTimeSilverlight.com

Feel free to email me with any feedback: Ken@RTLogicSystems.Com

 

Copyright ©2007 Ken Dopierala Jr.
Permalink | Trackback

Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment  Cancel 
Nationwide Freight Trucks - Reefer - Expedited - LTL - Truck Load - Brokerage

Free Online Dating Coupons (Match.Com, Date, PerfectMatch, Lavalife and More)



Blog_Archive
Minimize

Print  

Nationwide Building Permits - Courier Services - Expedited Permits - Retail Construction Permits

Who is looking for you online?
Find out now....


Click Here to get 1 month FREE Dedicated Hosting
Trusted by over 7 million customers!

Privacy Statement  |  Terms Of Use
Copyright 2007 by RTLogicSystems.Com