private void mouseDown(object sender, MouseEventArgs e) { if (!SelectionOptions.Enabled) { return; } if (e.Button != MouseButtons.Left) { return; } var hitInfo = CalcHitInfo(e.Location); if (_hitInfo.IsSomeButton) { return; } var cancelArgs = new CancelEventArgs(); SelectionStarted?.Invoke(this, hitInfo, cancelArgs); if (cancelArgs.Cancel) { return; } _selection.StartAt(e.Location); hideButtons(); }
public void OnPointerDown(PointerEventData eventData) { if (!_hasSelection) { _hasSelection = true; SelectionStarted?.Invoke(); OnPointerEnter(eventData); } }
public void StartSelection(IVideoContent firstSelectedItem = null) { if (!IsSelectionEnabled) { IsSelectionEnabled = true; if (firstSelectedItem != null) { SelectionItems.Add(firstSelectedItem); SelectionStarted?.Invoke(this, new RequestSelectionStartEventArgs() { FirstSelectedItem = firstSelectedItem }); } } }
protected void OnSelectionStarted() { SelectionStarted?.Invoke(this, new EventArgs()); }
protected void OnSelectionStarted() { SelectionStarted?.Invoke(this, EventArgs.Empty); }