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

Adding and Removing Resources "crashes" the ScheduleView style

1 Answer 30 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Annett
Top achievements
Rank 1
Annett asked on 02 Mar 2012, 10:58 AM
Hi,

I add and remove some resources. That works fine. If i navigate to my scheduleview (its on a different tabitem) the added resources wouldn't be shown.
I try these solution http://www.telerik.com/community/forums/wpf/scheduleview/how-to-refresh-scheduleview-when-clearing-and-re-adding-to-resourcetype-resources.aspx and it works.
I do this on the ScheduleViewLoaded event. This is fired if i changed the tabitem.
void RadSchedViewLoaded(object sender, RoutedEventArgs e)
{
    var scheduleViewModel = DataContext as ScheduleViewModel;
    if (scheduleViewModel != null)
    {
        scheduleViewModel.RefeshAppointmentSettings();
 
        var groupDescriptionsSource = _radSchedView.GroupDescriptionsSource;
        _radSchedView.ClearValue(RadScheduleView.GroupDescriptionsSourceProperty);
        _radSchedView.SetValue(RadScheduleView.GroupDescriptionsSourceProperty, groupDescriptionsSource);
 
    }
}

But somehow it crashes my style. See in my added picutres. The rows are greater after adding (afteraddingresource.jpg) and if i navigate the week up and down (afteraddingresourceandchangingvisibiblerange.jpg) it looks correct again.

What can i do? Can i set for example somehow the resource.MaxHeight?

Thanks
Annett

1 Answer, 1 is accepted

Sort by
0
Annett
Top achievements
Rank 1
answered on 04 May 2012, 02:12 PM
Hello,

has someone an idea how i can fix the style-crashes?

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