Пример #1
0
 private void InitializeColumns()
 {
     if (this.Orientation == Orientation.Horizontal)
     {
         AppointmentSlotCollection source = this.AppointmentItemsControl != null ? this.AppointmentItemsControl.ItemsSource as AppointmentSlotCollection : null;
         if (source != null)
         {
             var sortedAppointmentInfo = InitizlieAppointmentSlotInformation(source);
             var groups = InitizlieAppointmentSlotGroup(sortedAppointmentInfo);
             for (int i = 0; i < groups.Count; i++)
             {
                 var groupInfo = groups[i];
                 this.columns.Add(VirtualizedAppointmentPanel.SplitToColumns(groupInfo));
             }
         }
     }
 }
        internal void RecycleAllAppointmentItems()
        {
            VirtualizedAppointmentPanel panel = this.ItemsHost as VirtualizedAppointmentPanel;

            if (panel != null)
            {
                panel.RecycleAllAppointmentItems();
                panel.InvalidateMeasure();
            }
            if (this.ItemsHost != null)
            {
                foreach (UIElement item in this.ItemsHost.Children)
                {
                    AppointmentItem container = item as AppointmentItem;
                    if (container != null)
                    {
                        container.ClearValue(AppointmentItem.SchedulerProperty);
                    }
                }
            }
        }