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

MinorTickLength sets the AppointmentMinLength?

1 Answer 75 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Annett
Top achievements
Rank 1
Annett asked on 24 Feb 2012, 02:03 PM
Hi,

I add appointments programmaticaly to the appointmentslist and calculate the end new. If i calculate an end which is smaler than 1 hour (MinorTickLength = 1h) the ScheduleView shows me anyhow the appointment with 1h lenght. My tooltip shows me the real start and end but the scheduleview appointment-bar not. I set the BeginEdit and Commit things and i remove and add the appointments again to the property, but always he shows me the appointment-bar wrong.

Look at my picture. In this example i have 2 Appointments but it looks like 3 Appointments. What is the little shadow over the green appointment? These "shadow" has the rigth length.

I want that an appointment end is 12:59 pm or the start of the next appointment diff 1 minute. No overlapping!

Here my code:
this is the calculating in method
private void RefeshAppointmentSettings()
{
// ... do some stuff
 
    CustomAppointment previous = null;
    var i = 0;
    foreach (var custSorted in toSort)
    {
        if (i > 0)
        {
            if (previous != null)
            {
                previous.End = custSorted.Start.AddMinutes(-1);
            }
        }
        previous = custSorted;
        previous.End = previous.Start.Date.AddDays(1).AddMinutes(-1);
        i++;
    }
    Appointments.AddRange(toSort);
// ... do some stuff
}

this is the caller event:
private void SwitchTimeSpecialTimeTLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
{
    var scheduleViewModel = DataContext as ScheduleViewModel;
    if (scheduleViewModel != null)
    {
        scheduleViewModel.RefeshAppointmentSettings();
        _radSchedView.BeginEdit();
        var arr = new CustomAppointment[scheduleViewModel.Appointments.Count];
        scheduleViewModel.Appointments.CopyTo(arr, 0);
        scheduleViewModel.Appointments.Clear();
        for(int i = 0;i<arr.Length;i++)
        {
            scheduleViewModel.Appointments.Add(arr[i]);
        }
        _radSchedView.Commit();
    }
}

Thanks

Annett

1 Answer, 1 is accepted

Sort by
0
Annett
Top achievements
Rank 1
answered on 24 Feb 2012, 02:23 PM
Oh sorry if you reading this, i found the answer 10 minutes after posting.

EnableSmallAppointmentRendering="False"

Thanks
Annett
Tags
ScheduleView
Asked by
Annett
Top achievements
Rank 1
Answers by
Annett
Top achievements
Rank 1
Share this question
or