public MediaMenu GetMediaMenuView() { if (MediaMenu == null) { MediaMenu = new MediaMenu { DataContext = this }; } return(MediaMenu); }
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { IMenuClosable menuClosable = values[0] as IMenuClosable; MediaMenu mediaMenu = values[1] as MediaMenu;; if (mediaMenu == null || menuClosable == null) { return(null); } menuClosable.Close = delegate { Dispatch("Remove PopUps", new Func <PopUp, bool>(popUp => ReferenceEquals(popUp.PopUpElement, mediaMenu))); mediaMenu.Menu?.Reset(); }; return(menuClosable); }
public void Dispose() { MediaMenu = null; }