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