This is one of the samples I did sometime back for showing the ticks. The code is compiled with Silverlight 3 beta but should work in Silverlight 2 also without any changes
you can find the source here
This is one of the samples I did sometime back for showing the ticks. The code is compiled with Silverlight 3 beta but should work in Silverlight 2 also without any changes
you can find the source here
Nice, but I could not get this to run inside of Silverlight unless I adopted exactly the same layout…is there anyway to make this into a resource I can drag and drop into my grid?
John,
I did not quite understand what you are trying to do
I tried this CustomeSlider class but throwing run time error at:
bottomTicksCanvas.Children.Clear()
bottomTicksCanvas.Children.Add(CreateTick(new Point(x1, 0), new Point(x1, 5)))
Please help me
Thanks
Nice
I want through value into the slider, I replaced thumb with callout using style’s I am unable to get value into the callout plz help me
Hi,
I am not sure I understand, can you send an image/sample of what you are looking for.
If your Minimum is nonzero, you’ll need to CreateLabel based on:
(int)Minimum + (int)Math.Round(((Maximum – Minimum) / numberOfTicks) * (i), 0)
Bill,
Thanks for sharing the code
This is not working as bottomTicksCanvas is null as soon as it starts. Any ideas on how this is supposed to work in Silverlight 4 with VS2010?
Never mind, the Themes folder was missing adding generic.xaml to it fixed everything. Thanks.
other solution when Minimum is nonzero,
Initialize label with the minimum value and increment with thick value, like this:
//before the for loop
var label= Minimum;
//inside the for loop
bottomTicksCanvas.Children.Add(CreateLabel((Math.Round(ticksValue, 0)).ToString(), 6.0, x1));
ticksValue += TickFrequency;
———————————- Line replaced:
bottomTicksCanvas.Children.Add(CreateLabel((Math.Round(((Maximum – Minimum) / numberOfTicks) * (i), 0)).ToString(), 6.0, x1));
If Orientation is vertical, labels don’t show up.
you would have to change the template
how to implement above slider in windows phone 7? I tried to implement it, every thing is going fine except slider not showin on page.
Can you please post the same for vertical orientation….