protected override void OnMouseUp(MouseEventArgs args)
 {
     SelectedItem = null;
     Capture = false;
 }
 private void SetPosition(SceneItem sceneItem, Point pixelPoint)
 {
     sceneItem.TimeStart = PixelsToTime(pixelPoint.X);
     sceneItem.RowIndex = PixelsToRow(pixelPoint.Y);
 }
 protected override void OnMouseDown(MouseEventArgs args)
 {
     SelectedItem = GetItemAt(args.Location);
     Capture = true;
 }
 private Rectangle CreatePixelRectangle(SceneItem sceneItem)
 {
     return new Rectangle
     {
         X = TimeToPixels(sceneItem.TimeStart),
         Y = RowToPixels(sceneItem.RowIndex),
         Width = TimeToPixels(sceneItem.Duration),
         Height = RowToPixels(1)
     };
 }