Search code examples
xamlwindows-phone-7

Slider overflow


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?


Solution

  • 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.