Example #1
0
 public MediaMenu GetMediaMenuView()
 {
     if (MediaMenu == null)
     {
         MediaMenu = new MediaMenu
         {
             DataContext = this
         };
     }
     return(MediaMenu);
 }
Example #2
0
        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);
        }
Example #3
0
 public void Dispose()
 {
     MediaMenu = null;
 }