61 lines
1.7 KiB
C#
61 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices.WindowsRuntime;
|
|
using Windows.Foundation;
|
|
using Windows.Foundation.Collections;
|
|
using Windows.UI.Xaml;
|
|
using Windows.UI.Xaml.Controls;
|
|
using Windows.UI.Xaml.Controls.Primitives;
|
|
using Windows.UI.Xaml.Data;
|
|
using Windows.UI.Xaml.Input;
|
|
using Windows.UI.Xaml.Media;
|
|
using Windows.UI.Xaml.Navigation;
|
|
|
|
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
|
|
|
|
namespace FoxTube
|
|
{
|
|
/// <summary>
|
|
/// An empty page that can be used on its own or navigated to within a Frame.
|
|
/// </summary>
|
|
public sealed partial class SubLayer : Page
|
|
{
|
|
public MainPage Main = new MainPage();
|
|
public Frame Fullscreen = new Frame();
|
|
|
|
Video initialParent;
|
|
|
|
public SubLayer()
|
|
{
|
|
this.InitializeComponent();
|
|
grid.Children.Add(Main);
|
|
grid.Children.Add(Fullscreen);
|
|
}
|
|
|
|
public void EnterFullScreen(VideoPlayer element, Video initParent)
|
|
{
|
|
initialParent = initParent;
|
|
if(grid.Children.Contains(element))
|
|
{
|
|
grid.Children.Remove(element);
|
|
initialParent.SetPlayerBack();
|
|
initialParent = null;
|
|
}
|
|
else
|
|
grid.Children.Add(element);
|
|
/*Fullscreen.Content = element;
|
|
Fullscreen.Visibility = Visibility.Visible;*/
|
|
}
|
|
|
|
public void ExitFullScreen()
|
|
{
|
|
grid.Children.RemoveAt(1);
|
|
initialParent.SetPlayerBack();
|
|
/*Fullscreen.Content = null;
|
|
Fullscreen.Visibility = Visibility.Collapsed;*/
|
|
}
|
|
}
|
|
}
|