Ok, so I am trying to build out an UI where I use the <Slider> UX control to indicate passing time (this is for the Dimecasts.net WP7 application). But the oddest thing happened, when I put the slider control onto my page it did not show up. I thought maybe I was doing something wrong so I dropped the control onto a sample application and everything worked just fine... Odd
Here is the Xaml that I tried the first time around.
If you look towards the bottom of the Xaml you will see the Slider control. This should work but it does not..odd. Now when I put this into my sample application it worked just fine. After looking at the code for a minute it dawned on me in my sample app I did not have the Slider in a grid. So I put it into a grid and sure enough it stopped being visible again. I did a bit of searching on bing and google but i could not find an answer. So I turned to Twitter and sure enough I got a suggestion from @sirleamont (see below)
After the suggestion from @sirleamont I created the Xaml as below and surprise it worked :)
The only change I made is to wrap the Slider control inside a StackPanel. Something still seems odd here, but hey it works. If anyone knows exactly why this is the case please let me know.
Till next time,
Posted
12-27-2010 12:34 PM
by
Derik Whittaker