滑块溢出
我的页面中有类似弹出窗口的边框。弹出窗口内有滑块。滑块的范围从 0 到 100,但是当我将其滑动到右边缘时,我得到了接近 vlaue 93 的值。滑块已满,但其最大值为 100。滑块似乎溢出了父容器。我尝试使用边距和静态宽度的所有组合,但没有成功。谁能告诉我应该设置什么才能让它工作?
这是代码片段:
<Grid x:Name="LayoutRoot" >
...
<Border VerticalAlignment="Center" Margin="24,0" Visibility="{Binding ...}">
<StackPanel>
<TextBlock Text="choose desired position" />
<Slider x:Name="sldGoto" Maximum="100" SmallChange="1" LargeChange="10" Value="93"/>
</StackPanel>
</Border>
</Grid>
使用此代码(滑块的值设置为 93)滑块已满。怎么了?
I have popup-like border in my page. There is slider inside the popup. The slider has range from 0 to 100, but when I slide it to the right edge I get somewhere near to vlaue 93. Slider is full but its maximum is 100. It seems that slider overflowed the parent container. I tried to use all combinations of margins and static widths, but without success. Can anyone tell me what I am supposed to set, to get it work?
Here is fragment of code:
<Grid x:Name="LayoutRoot" >
...
<Border VerticalAlignment="Center" Margin="24,0" Visibility="{Binding ...}">
<StackPanel>
<TextBlock Text="choose desired position" />
<Slider x:Name="sldGoto" Maximum="100" SmallChange="1" LargeChange="10" Value="93"/>
</StackPanel>
</Border>
</Grid>
With this code (value of slider set to 93) is slider full. What's wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是当前版本中在 Windows Phone 7 上使用带有标准控件模板的 Slider 时的一个已知错误。我建议暂时使用您在 Dave 博客上找到的方法。
This is a known bug in the current release when using Slider on Windows Phone 7 with the standard control template. I recommend using the approach you found on Dave's blog for now.
好吧,我只是找到 文章,带有漂亮的滑块控件模板,可以正常工作。
如果有人能证实这种行为或告诉我我做错了什么,我仍然会很感激。
谢谢
Well I just find article with nice Slider ControlTemplate that just works.
I would still appreciate if anyone could confirm this behavior or told me what I did wrong.
Thanks