This is a migrated thread and some comments may be shown as answers.

Thumb positioning bug

1 Answer 69 Views
Slider
This is a migrated thread and some comments may be shown as answers.
hwsoderlund
Top achievements
Rank 1
hwsoderlund asked on 08 Oct 2008, 01:40 PM
I've experienced some weird behaviour when changing the width, the tick scale and the value of the slider simultaneously. The position of the thumb becomes erratic. The behaviour is very hard to describe in words. Try the code below and see for yourself. The weirdness appears when the first button is clicked.

<UserControl x:Class="SilverlightApplication7.Page6" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
             xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
    Width="600" Height="300"
    <Grid x:Name="LayoutRoot" Background="White"
        <StackPanel> 
            <telerik:RadSlider x:Name="Sld01" 
                               HorizontalAlignment="Stretch" 
                               Minimum="1" 
                                Maximum="10" 
                               Value="3" 
                                TickFrequency="1" 
                                IsMoveToPointEnabled="True" 
                                IsSnapToTickEnabled="True" 
                                TickPlacement="Both"></telerik:RadSlider> 
            <Button x:Name="Btn01" Content="5 steps, value 3, width 250"></Button> 
            <Button x:Name="Btn02" Content="10 steps value 3, width 500"></Button> 
        </StackPanel> 
    </Grid> 
</UserControl> 
 

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Net; 
using System.Windows; 
using System.Windows.Controls; 
using System.Windows.Documents; 
using System.Windows.Input; 
using System.Windows.Media; 
using System.Windows.Media.Animation; 
using System.Windows.Shapes; 
 
namespace SilverlightApplication7 
    public partial class Page6 : UserControl 
    { 
        public Page6() 
        { 
            InitializeComponent(); 
            Btn01.Click += new RoutedEventHandler(Btn01_Click); 
            Btn02.Click += new RoutedEventHandler(Btn02_Click); 
        } 
 
        void Btn01_Click(object sender, RoutedEventArgs e) 
        { 
            Sld01.Minimum = 1; 
            Sld01.Maximum = 5; 
            Sld01.Value = 3; 
            Sld01.Margin = new Thickness(0, 0, 350, 0); 
        } 
 
        void Btn02_Click(object sender, RoutedEventArgs e) 
        { 
            Sld01.Minimum = 1; 
            Sld01.Maximum = 10; 
            Sld01.Value = 3; 
            Sld01.Margin = new Thickness(0, 0, 100, 0); 
        } 
    } 
 

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantin Petkov
Telerik team
answered on 10 Oct 2008, 07:15 AM
Hi hwsoderlund,

We have to admit about this bug in RadSlider, but I'm pleased to inform you it is already addressed. We just scheduled the next official update of the RadControls for Silverlight suite for Tuesday next week so you will be able to get this issue resolved with that update.

Thank you for pointing this out to us! I have updated your Telerik points.

Best wishes,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Slider
Asked by
hwsoderlund
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Share this question
or