Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Slider > Binding SelectionStart does not work in Q2

Not answered Binding SelectionStart does not work in Q2

Feed from this thread
  • Jorn Master avatar

    Posted on Jul 19, 2011 (permalink)

    This XAML worked in Q1, but no longer works (SelectionEnd binds OK):

    <telerik:RadSlider Width="220" TickFrequency="0.1" TickPlacement="BottomRight" IsSelectionRangeEnabled="True" Minimum="0" Maximum="1" MinimumRangeSpan="0" MaximumRangeSpan="1" SelectionStart="{Binding lower_threshold, Mode=TwoWay, Converter={StaticResource RoundDouble}, ConverterParameter=2}" SelectionEnd="{Binding upper_threshold, Mode=TwoWay, Converter={StaticResource RoundDouble}, ConverterParameter=2}" IsTabStop="False"/>

    Reply

  • Kiril Stanoev Kiril Stanoev avatar

    Posted on Jul 21, 2011 (permalink)

    Hi Jorn,

    I can confirm that SelectionStart does not work as expected after the official Q2 release. I've logged this issue in our PITS under the name "Slider: Binding SelectionStart does not work as expected after Q2 2011" and we'll do our best to fix it for the upcoming Service Pack. As a workaround you can use the new Selection property.

    <UserControl x:Class="SilverlightApplication1.MainPage"
            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">
        <Grid x:Name="LayoutRoot" Background="White">
            <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                <telerik:RadSlider Width="500" TickFrequency="0.1" TickPlacement="BottomRight"
                        IsSelectionRangeEnabled="True" Minimum="0" Maximum="1" MinimumRangeSpan="0"
                        MaximumRangeSpan="1" Selection="{Binding Selection, Mode=TwoWay}"
                        IsTabStop="False" />
                <TextBlock Text="{Binding Selection.Start}" FontSize="24" />
                <TextBlock Text="{Binding Selection.End}" FontSize="24" />
            </StackPanel>
        </Grid>
    </UserControl>

    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            this.DataContext = new DataItem();
        }
    }

    public class DataItem : INotifyPropertyChanged
    {
        private SelectionRange<double> selection = new SelectionRange<double>(0.2, 0.6);
     
        public SelectionRange<double> Selection
        {
            get
            {
                return this.selection;
            }
            set
            {
                if (this.selection != value)
                {
                    this.selection = value;
                    this.OnPropertyChanged("Selection");
                }
            }
        }
     
        public event PropertyChangedEventHandler PropertyChanged;
     
        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }

    Give it a try and let me know if it works for you. I've also updated your Telerik points accordingly.

    Kind regards,
    Kiril Stanoev
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

    Reply

  • Jorn Master avatar

    Posted on Aug 25, 2011 (permalink)

    Internal build 0823 seems to have fixed this!

    Reply

  • Jorn Master avatar

    Posted on Nov 14, 2011 (permalink)

    The latest couple of internal releases seems to have introduced this bug again! Can you please fix this?

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Nov 17, 2011 (permalink)

    Hi Jorn,

     Could you please elaborate more on your scenario, what is the version of this internal build that you use?
    Is it the same bug with the SelectionStart from your first post or even the Selection does not work ?
    In the attached solution I have prepared a sample databinding scenario which is broken in Q2 2011 and fixed in Q2 2011 SP and Official Q3 2011 (1116). The dlls in the project are from Q3 2011.
    Please keep in mind, that from Q2 2011, we strongly suggest you to use the Selection property instead of SelectionStart and SelectionEnd.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Attached files

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Slider > Binding SelectionStart does not work in Q2
Related resources for "Binding SelectionStart does not work in Q2"

Silverlight Slider Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]