Exemplo n.º 1
0
        private void OnAppointmentItemDragInfo(object sender, DragDropEventArgs e)
        {
            if (e.Options.Status == DragStatus.DragCancel)
            {
                TimeSlotItemsControl.ChangeAllDraggedItemsOpacity(this);
                if (this.ParentItemsControl != null && this.ParentItemsControl.TimeSlotItemsControl != null)
                {
                    this.ParentItemsControl.TimeSlotItemsControl.ClearAllItemsIsDropPossibleProperty();
                }
            }
            else if (e.Options.Status == DragStatus.DragInProgress)
            {
                if (Keyboard.Modifiers != ModifierKeys.Control)
                {
                    var draggedAppointmentItems = from app in this.ParentItemsControl.AppointmentItems
                                                  where app != null && app.AppointmentSlot.Occurrence.Appointment == this.AppointmentSlot.Occurrence.Appointment
                                                  select app;

                    foreach (var app in draggedAppointmentItems)
                    {
                        app.Opacity = 0;
                    }
                }
            }
        }