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

FixedTickProvider DependencyProperty question

1 Answer 6 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 07 Apr 2014, 04:58 PM
Hi,

I have a UserControl which contain a RadScheduleView with a WeekViewDefinition. In my control, I would like to have a DependencyProperty to set the number of minutes (int) for the MinorTickLength. I would like to know how I can acheive this.

Thank's
Alain

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 09 Apr 2014, 12:08 PM
Hello Alain,

In order to achieve the desired you would need to expose a DependencyProperty of type int in your UserControl code behind. Afterwards in the PropertyChanged method you will be able to set the MinorTickLength property of the WeekViewDefinition the following way:

if (e.NewValue != e.OldValue)
{
    var viewDefinition = ((ScheduleViewUserControl)d).ScheduleView.ActiveViewDefinition as WeekViewDefinition;
    viewDefinition.MinorTickLength = new FixedTickProvider(new DateTimeInterval((int)e.NewValue, 0, 0, 0, 0));
}

Hope this helps.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ScheduleView
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or