private void CloseMenu(object sender, MouseButtonEventArgs mouseButtonEventArgs) { //TODO: Send To Window And Pop It up if (_currentPopUp != null && _mediaMenu.IsMouseOver == false) { Dispatch("Remove PopUp", _currentPopUp); Menu?.Reset(); _currentPopUp = null; } }
private void OpenMenu(object sender, MouseButtonEventArgs mouseButtonEventArgs) { //TODO: Send To Window And Pop It up if (mouseButtonEventArgs.ChangedButton != MouseButton.Right) return; Dispatch("Add PopUp", _currentPopUp = new PopUp { PopUpElement = _mediaMenu, X = mouseButtonEventArgs.GetPosition(Application.Current.MainWindow).X, Y = mouseButtonEventArgs.GetPosition(Application.Current.MainWindow).Y }); }
public void RemovePopUp(PopUp popUp) { _popUps.Remove(popUp); }
public void AddPopUp(PopUp popUp) { _popUps.Add(popUp); }