private void Resize_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { e.Handled = true; if (_appointment.CategoryID != "") { if (_appointment.Category.ReadOnly) { GenericFunctions.ShowReadOnlyMessage(); return; } } if (_appointment.IsRepeating) { throw (new NotImplementedException("Resizing recurring items is not currently supported.")); } IInputElement _sender = (IInputElement)sender; _mouseOffset = Mouse.GetPosition(_sender); _isResized = false; Mouse.Capture(_sender); }