Adding and Removing Resources "crashes" the ScheduleView style

2 posts, 0 answers
  1. Annett
    Annett avatar
    24 posts
    Member since:
    Sep 2011

    Posted 02 Mar 2012 Link to this post

    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
  2. Annett
    Annett avatar
    24 posts
    Member since:
    Sep 2011

    Posted 04 May 2012 Link to this post

    Hello,

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

    Thanks
    Annett
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top