Thursday, July 28, 2011
by
XAML Team
|
Go comment!
Recently there was a
feature request for out-of-the-box support for a ToolTip while dragging any of RadSlider's thumbs. Since we don't provide one yet we decided to check whether it is possible to accomplish this scenario with the current implementation of
RadSlider. It turned out that it was actually quite trivial. Few attached properties, a little bit of knowledge about tooltips in Silverlight and
voila!
Below is the class that does all the magic. It is pretty self explanatory.
public class SliderToolTipExtensions : DependencyObject
{
private static string SingleThumbName = "SingleThumbHost";
private static string RangeStartThumb = "RangeStartThumb";
private static string RangeEndThumb = "RangeEndThumb";
private static string ValuePropertyPath = "Value";
private static string SelectionStartPropertyPath =...