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

the slider of RadTimeBar won't move

3 Answers 74 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
Xiaojun
Top achievements
Rank 1
Xiaojun asked on 19 Jan 2012, 03:37 AM
PeriodEnd and PeriodStart are bound from VM, the silder of RadTimeBar won't move.
If they are coded in xaml file, it works. Why?
Product version is 2011.2.0712.1040
it didn't work.
                                view:RadTimeBarProperty.StartDate="{Binding PeriodStart, Mode=OneWay}"
                                view:RadTimeBarProperty.EndDate="{Binding PeriodEnd, Mode=OneWay}"
it didn't work.
                                PeriodStart="{Binding PeriodStart, Mode=TwoWay}"
                                PeriodEnd="{Binding PeriodEnd, Mode=TwoWay}"
it did work.
                                PeriodEnd="2012-1-9"
                                PeriodStart="2005-5-19"

3 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 19 Jan 2012, 05:27 PM
Hi,

Ineed, we had such problems with previous versions of the control, but these were fixed for Q2 2011 - the version that you use. I tried to reproduce the problem you describe locally, but to no avail. Please find my test code attached. Could you please prepare and send me a simple running project, demonstrating the problem? 

All the best,
Tsvetie
the Telerik team

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

0
Xiaojun
Top achievements
Rank 1
answered on 20 Jan 2012, 07:23 AM
Date is to be asynchronous. I can not upload attachments, so I use a button to simulate the asynchronous call.
xaml
<Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="1*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <telerik:RadTimeBar x:Name="RadTimeBar1"
                            PeriodStart="{Binding PeriodStart, Mode=TwoWay}"
                            PeriodEnd="{Binding PeriodEnd, Mode=TwoWay}">
            <telerik:RadTimeBar.Intervals>
                <telerik:MonthInterval />
                <telerik:YearInterval />
            </telerik:RadTimeBar.Intervals>
        </telerik:RadTimeBar>
        <!-- I added these -->
        <Button Content="Test"
                Grid.Row="1"
                Click="Button_Click" />
    </Grid>
cs
public ChangingProperties()
        {
            InitializeComponent();
 
            RadTimeBar1.DataContext = this;
 
            // I removed these
            //this.PeriodEnd = new DateTime(2012, 1, 9);
            //this.PeriodStart = new DateTime(2005, 5, 19);
        }
// I add these
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.PeriodEnd = new DateTime(2012, 1, 9);
            this.PeriodStart = new DateTime(2005, 5, 19);
        }

0
Accepted
Tsvetie
Telerik team
answered on 24 Jan 2012, 01:28 PM
Hello,

I updated my test page with the code that you posted and I was able to reproduce the problem with the 2011.2.0712.1040 version of the suite. This problem is fixed in the 2011.2.920.1040 version. That is why, in case you upgrade to Q2 2011 SP1 or a later version, the problem should be fixed.

Regards,
Tsvetie
the Telerik team

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

Tags
TimeBar
Asked by
Xiaojun
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Xiaojun
Top achievements
Rank 1
Share this question
or