public void ExpandVideo(VideoStreamingControl.UserControl1 SelectedUC) { if (fullscreen == false)//e.ClickCount == 2 && { GridMediaPlayer.Visibility = Visibility.Hidden; GridMediaPlayer.Children.RemoveAt(0); if (GridMediaPlayer.Children.Count > 1) { GridMediaPlayer.Children.RemoveAt(1); } } else if (fullscreen == true)//e.ClickCount == 2 && { GridMediaPlayer.Visibility = Visibility.Visible; GridMediaPlayer.Width = 360; GridMediaPlayer.Height = 180; var light = new VideoStreamingControl.UserControl1(); light.Width = 380; light.Height = 180; light.MouseDown += UserControl1_MouseDown; light.TouchLeave += UserControl1_TouchLeave; // var SelectedUC = e.Source as VideoStreamingControl.UserControl1; light.TextExposedInXaml = SelectedUC.TextExposedInXaml; GridMediaPlayer.Children.Add(light); Button btn_min = new Button(); btn_min.Content = ""; btn_min.Click += btn_fullscreen_Click; GridMediaPlayer.Children.Add(btn_min); } fullscreen = !fullscreen; }
public void ExpandVideo(VideoStreamingControl.UserControl1 SelectedUC) { if (fullscreen == false)//e.ClickCount == 2 && { flt_canvas_MediaPlayer.Visibility = Visibility.Hidden; flt_canvas_MediaPlayer.Children.RemoveAt(0); } else if (fullscreen == true)//e.ClickCount == 2 && { flt_canvas_MediaPlayer.Visibility = Visibility.Visible; var light = new VideoStreamingControl.UserControl1(); light.Width = 300; light.Height = 180; light.MouseDown += UserControl1_MouseDown; light.TouchLeave += UserControl1_TouchLeave; // var SelectedUC = e.Source as VideoStreamingControl.UserControl1; light.TextExposedInXaml = SelectedUC.TextExposedInXaml; flt_canvas_MediaPlayer.Children.Add(light); } fullscreen = !fullscreen; }