private void imageBox_Selecting(object sender, ImageBoxCancelEventArgs e) { if (_dragItem.Contains(imageBox.PointToImage(e.Location))) { e.Cancel = true; } }
private void imageBox_Selecting(object sender, ImageBoxCancelEventArgs e) { eventsListBox.AddEvent((Control)sender, "Selecting", new Dictionary <string, object> { { "Location", e.Location }, { "Cancel", e.Cancel } }); }
/// <summary> /// Raises the <see cref="ImageBox.Selecting" /> event. /// </summary> /// <param name="e"> /// The <see cref="System.EventArgs" /> instance containing the event data. /// </param> protected override void OnSelecting(ImageBoxCancelEventArgs e) { e.Cancel = this.IsMoving || this.IsResizing || this.SelectionRegion.Contains(this.PointToImage(e.Location)) || this.HitTest(e.Location) != DragHandleAnchor.None; base.OnSelecting(e); }
private void imageBox_Selecting(object sender, ImageBoxCancelEventArgs e) { if (_dragItem.Contains(imageBox.PointToImage(e.Location))) e.Cancel = true; }
private void imageBox_Selecting(object sender, ImageBoxCancelEventArgs e) { eventsListBox.AddEvent((Control)sender, "Selecting", new Dictionary<string, object> { { "Location", e.Location }, { "Cancel", e.Cancel } }); }