/**
         * <summary>Creates a media player in the provided Grid with a thumbnail added to the specified StackPanel.</summary>
         * */
        public MediaApp(StackPanel AppStack, Grid MainContainer, string Vid)
        {
            vid = Vid;
            this.InitializeComponent();
            
            thumbnail = new MediaApp(AppStack, MainContainer, this, Vid);
            this.AppStack = AppStack;
            AppStack.Children.Add(thumbnail);

            this.MainContainer = MainContainer;

            MediaP.AutoPlay = true;
            //MediaP.IsMuted = false;
            MediaP.Tapped += MediaP_Tapped;
            MediaP.PointerMoved += MediaP_PointerMoved;
            MediaP.MediaOpened +=MediaP_MediaOpened;
            MediaP.SeekCompleted += MediaP_SeekCompleted;

            MediaContainer.MaxHeight = MainContainer.ActualHeight;
            MediaContainer.MaxWidth = MainContainer.ActualWidth;

            thumbnail.MaxHeight = Window.Current.Bounds.Height * 0.0625;
            thumbnail.MaxWidth = Window.Current.Bounds.Width * 0.0625;

            MediaControl.PlayPressed += MediaControl_PlayPressed;
            MediaControl.PausePressed += MediaControl_PausePressed;
            MediaControl.PlayPauseTogglePressed += MediaControl_PlayPauseTogglePressed;
            MediaControl.StopPressed += MediaControl_StopPressed;
        }
        /**
         * <summary>Creates thumbnail version of media player.</summary>
         * 
         * */
        private MediaApp(StackPanel AppStack, Grid MainContainer, MediaApp mainApp, string Vid)
        {
            vid = Vid;
            this.InitializeComponent();
            this.mainApp = mainApp;
            MediaP.IsMuted = false;
            this.AppStack = AppStack;

            this.MainContainer = MainContainer;

            this.Tapped += RestoreSize;
            MediaP.AutoPlay = true;

            MediaContainer.MaxHeight = Window.Current.Bounds.Height * 0.0625;
            MediaContainer.MaxWidth = Window.Current.Bounds.Width * 0.0625;
            this.Margin = new Thickness(0, 0, 0, 5);

            ControlGridPanel.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

            MediaControl.PlayPressed += MediaControl_PlayPressed;
            MediaControl.PausePressed += MediaControl_PausePressed;
            MediaControl.PlayPauseTogglePressed += MediaControl_PlayPauseTogglePressed;
            MediaControl.StopPressed += MediaControl_StopPressed;
        }