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

Setting ITickProvider causes crash or freeze of Visual Studio 2019

0 Answers 76 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Veteran
Markus asked on 19 Jun 2020, 11:48 AM

Hello, 

in my code I want to set the MajorTickLength.

But if I do that, the Visual Studio Designer freeze or crashed with a Out of Memory Exception. 

 

 

      <controls:RadScheduleView x:Name="MapScheduleView" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                                  NavigationHeaderVisibility="Collapsed"
                                  MinAppointmentHeight="5"
                                  >
            <controls:RadScheduleView.ActiveViewDefinition>
                <controls:TimelineViewDefinition MinTimeRulerExtent="1" MaxTimeRulerExtent="Infinity" ShowTimeRuler="False"
                                                 StretchAppointments="True" StretchGroupHeaders="True">
                    <controls:TimelineViewDefinition.MajorTickLength>
                        <provider:OneYearTick/>
                    </controls:TimelineViewDefinition.MajorTickLength>
                </controls:TimelineViewDefinition>
            </controls:RadScheduleView.ActiveViewDefinition>
        </controls:RadScheduleView>

The tick provider:

public class OneYearTick : ITickProvider
    {
        public string GetFormatString(IFormatProvider formatInfo, string formatString, DateTime currentStart)
        {
            return string.Empty;
        }
        public DateTime GetNextStart(TimeSpan pixelLength, DateTime currentStart)
        {
            return currentStart.AddYears(1);
        }

}

Telerik Version: 2020.2.513.45

Best regards

 

No answers yet. Maybe you can help?

Tags
ScheduleView
Asked by
Markus
Top achievements
Rank 1
Veteran
Share this question
or