private void BtnClick(object sender, RoutedEventArgs e) { var s = (string)((Button)sender).Tag; var a = s.Split(','); var dx = int.Parse(a[0]); var dy = int.Parse(a[1]); if (dx == 0 && dy == 0) { if (AV.IsFullScreen) { AV.ExitFullScreenMode(); } else { AV.TryEnterFullScreenMode(); } } else { x += dx; y += dy; AV.TryResizeView(new Size(x, y)); } }
private async void setFull(bool status) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { ApplicationView view = ApplicationView.GetForCurrentView(); Grid.SetRow(canvas, 0); Grid.SetRowSpan(canvas, 10); if (status) { view.TryEnterFullScreenMode(); Grid.SetColumn(canvas, 0); Grid.SetColumnSpan(canvas, 10); Grid.SetRow(canvas, 0); Grid.SetRowSpan(canvas, 10); canvas.Margin = new Thickness(0, 0, 0, 0); canvas_wid = canvas.Width; canvas_heig = canvas.Height; } else { view.ExitFullScreenMode(); Grid.SetColumn(canvas, 4); Grid.SetColumnSpan(canvas, 6); Grid.SetRow(canvas, 0); Grid.SetRowSpan(canvas, 9); canvas.Margin = new Thickness(0, 25, 10, 30); canvas.Width = canvas_wid; canvas.Height = canvas_heig; } }); }
public MainPage() { InitializeComponent(); view.TryEnterFullScreenMode(); // Full screen mode activate if (localSettings.Values.ContainsKey("urlShared")) { var urlShared = (string)localSettings.Values["urlShared"]; facebookWebView.Navigate(new Uri(urlShared)); // Load facebook sharing page localSettings.Values.Remove("urlShared"); // Remove } else { GoHome(); // Loads the main page } // Handle the back button request (go to the previous page) SystemNavigationManager.GetForCurrentView().BackRequested += (s, a) => { if (facebookWebView.CanGoBack) { facebookWebView.GoBack(); a.Handled = true; // This block the app closing } }; }
private async void LaunchScreen(object sender, RoutedEventArgs e) { newView = CoreApplication.CreateNewView(); int newViewId = 0; await newView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { newView.TitleBar.ExtendViewIntoTitleBar = true; ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar; titleBar.ButtonBackgroundColor = Colors.Transparent; titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; var newWindow = Window.Current; newAppView = ApplicationView.GetForCurrentView(); Screenframe = new Frame(); Screenframe.Navigate(typeof(OutScreen), null); newWindow.Content = Screenframe; newWindow.Activate(); newViewId = newAppView.Id; }); var viewShown = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newViewId); if (newAppView != null) { newAppView.TryEnterFullScreenMode(); } }
private void fullScreenClick(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { view.ExitFullScreenMode(); fullWidth = myMediaElement.Width; fullHeight = myMediaElement.Height; myMediaElement.Width = currentWidth; myMediaElement.Height = currentHeight; } else { view.TryEnterFullScreenMode(); fullWidth = 1280; fullHeight = 720; currentWidth = myMediaElement.Width; currentHeight = myMediaElement.Height; myMediaElement.Width = fullWidth; myMediaElement.Height = fullHeight; } }
public MainPage() { InitializeComponent(); // if full screen mode is activated, try to enter in full screen mode if (localSettings.Values.ContainsKey("fullScreen")) { if ((bool)localSettings.Values["fullScreen"]) { view.TryEnterFullScreenMode(); // Full screen mode activate } else { view.ExitFullScreenMode(); } } GoHome(); // Loads the main page // Handle the back button request (go to the previous page) SystemNavigationManager.GetForCurrentView().BackRequested += (s, a) => { if (facebookWebView.CanGoBack) { facebookWebView.GoBack(); a.Handled = true; // This block the app closing } }; }
private void SetFullScreen(bool e) { ApplicationView view = ApplicationView.GetForCurrentView(); if (e) { BottomBtnFull.Visibility = Visibility.Collapsed; BottomBtnExitFull.Visibility = Visibility.Visible; this.Margin = new Thickness(0, SettingHelper.GetValue <int>(SettingHelper.UI.DISPLAY_MODE, 0) == 0 ? -40 : -32, 0, 0); RightInfo.Width = new GridLength(0, GridUnitType.Pixel); BottomInfo.Height = new GridLength(0, GridUnitType.Pixel); //全屏 if (!view.IsFullScreenMode) { view.TryEnterFullScreenMode(); } } else { BottomBtnFull.Visibility = Visibility.Visible; BottomBtnExitFull.Visibility = Visibility.Collapsed; this.Margin = new Thickness(0); RightInfo.Width = new GridLength(280, GridUnitType.Pixel); BottomInfo.Height = GridLength.Auto; //退出全屏 if (view.IsFullScreenMode) { view.ExitFullScreenMode(); } } }
/// <summary> /// 全屏按钮点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FullWindowButton_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); //和下面都是反着的 FullWindowSymbol.Symbol = Symbol.FullScreen; //DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait; //返回恢复原来的功能 SystemNavigationManager.GetForCurrentView().BackRequested -= MediaPlayer_OnBackRequested; //SystemNavigationManager.GetForCurrentView().BackRequested += Link.OnBackrequested; view.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseVisible); } else { view.TryEnterFullScreenMode(); //修改按钮图标 FullWindowSymbol.Symbol = Symbol.BackToWindow; //显示返回键 //横过来 //DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape; //使得返回变成退出全屏 //SystemNavigationManager.GetForCurrentView().BackRequested -= Link.OnBackrequested; SystemNavigationManager.GetForCurrentView().BackRequested += MediaPlayer_OnBackRequested; //使得导航栏透明 view.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); } }
void SetFullScreen(PrimaryPlayerDisplayMode currentMode) { if (!_view.IsFullScreenMode) { _view.TryEnterFullScreenMode(); } }
private void FullSreenButton_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); view.TryEnterFullScreenMode(); FullSreenButton.Visibility = Visibility.Collapsed; BackToWindowButton.Visibility = Visibility.Visible; }
/* public static MainPage Instance { get { return Nested.instance; } } * private class Nested * { * // Explicit static constructor to tell C# compiler not to mark type as beforefieldinit * static Nested() {} * internal static readonly MainPage instance = new MainPage(); * }*/ public MainPage() { this.InitializeComponent(); ApplicationView view = ApplicationView.GetForCurrentView(); view.TryEnterFullScreenMode(); Windows.UI.ViewManagement.ApplicationViewScaling.TrySetDisableLayoutScaling(true); }
public MainPage() { ApplicationView view = ApplicationView.GetForCurrentView(); view.TryEnterFullScreenMode(); this.InitializeComponent(); }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { this.DebugSettings.EnableFrameRateCounter = true; } #endif Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter var setup = new Setup(rootFrame); setup.Initialize(); var appStart = Mvx.Resolve <IMvxAppStart>(); appStart.Start(); //rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); Package package = Package.Current; var systemArchitecture = package.Id.Architecture.ToString(); if (systemArchitecture != "X64" && systemArchitecture != "X86") { ApplicationView view = ApplicationView.GetForCurrentView(); view.TryEnterFullScreenMode(); } // Ensure the current window is active Window.Current.Activate(); }
/// <summary> /// Enter fullscreen mode. /// </summary> private void EnterFullscreenMode() { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.TryEnterFullScreenMode()) { ApplicationView.GetForCurrentView().FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Minimal; } }
private void EnterKioskMode() { ApplicationView view = ApplicationView.GetForCurrentView(); if (!view.IsFullScreenMode) { view.TryEnterFullScreenMode(); } }
public MainPage() { this.InitializeComponent(); #if __ANDROID ApplicationView.TryEnterFullScreenMode(); #else ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen; #endif }
private void App_Resuming(object sender, object e) { // when we resume, make sure we're in full screen mode ApplicationView view = ApplicationView.GetForCurrentView(); if (null != view) { view.TryEnterFullScreenMode(); } }
private void SwitchFullScreenMode() { if (applicationView.IsFullScreenMode) { applicationView.ExitFullScreenMode(); } else { applicationView.TryEnterFullScreenMode(); } }
public MainPage() { this.InitializeComponent(); canvasDraw.HideComponent(imtexto, imlinha, imcirculo, imquadrado, imretangulo, imtamanho, imcor, imferramentas, imferramentas, imlimpar, imsalvar); ApplicationView view = ApplicationView.GetForCurrentView(); view.TryEnterFullScreenMode(); AtualizarImagemVideo(); var t = Task.Run(() => ShowThreadInfo()); var socket = Task.Run(() => SocketListenerAsync()); }
public Gerador_Grafos() { this.InitializeComponent(); ApplicationView view = ApplicationView.GetForCurrentView(); view.TryEnterFullScreenMode(); myConsole = new TextConsole(Console_output); graphStats = new Stats(Grafo_stats); graphStats.Clear(); }
protected override void Execute(object parameter) { System.Diagnostics.Debug.WriteLine("ToggleFullScreenCommand"); if (_currentView.IsFullScreenMode) { _currentView.ExitFullScreenMode(); } else { _currentView.TryEnterFullScreenMode(); } }
private void DmPlayer_FullscreenToggle() { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.TryEnterFullScreenMode()) { var size = GetActualSize(); MyRootGrid.Width = size.Width - 90; MyRootGrid.Height = size.Height - 190; } }
protected override void OnKeyDown(KeyRoutedEventArgs e) { base.OnKeyDown(e); if (e.Handled) { return; } switch (e.Key) { case VirtualKey.Control: _isCtrlPressed = true; break; case VirtualKey.P: if (_isCtrlPressed) { e.Handled = true; var action = GraphPrinter.PrintAsync(Graph); } break; case VirtualKey.N: if (_isCtrlPressed) { e.Handled = true; NewFunction(); } break; case VirtualKey.F11: { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); e.Handled = true; } else { e.Handled = view.TryEnterFullScreenMode(); } } break; #if PERF_TEST case VirtualKey.F5: PerfTest(); break; #endif } }
/* * private void List_Click(object sender, RoutedEventArgs e) * { * * } */ private void Display_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } }
private void NewsfeedWebView_ContainsFullScreenElementChanged(WebView sender, object args) { ApplicationView applicationView = ApplicationView.GetForCurrentView(); if (sender.ContainsFullScreenElement) { applicationView.TryEnterFullScreenMode(); } else if (applicationView.IsFullScreenMode) { applicationView.ExitFullScreenMode(); } }
private void BackgroundPanel_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); } else { bool succeeded = view.TryEnterFullScreenMode(); } ToggleControls(); }
private void FullScreen(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } }
private void FullButton_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } //mediaPlayerElement.IsFullWindow = !mediaPlayerElement.IsFullWindow; }
public void ShowFullScreen() { ApplicationView appView = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = appView.IsFullScreenMode; if (isInFullScreenMode) { appView.ExitFullScreenMode(); } else { appView.TryEnterFullScreenMode(); } }
public MainPage() { ApplicationView view = ApplicationView.GetForCurrentView(); view.TryEnterFullScreenMode(); InitializeComponent(); SystemNavigationManager.GetForCurrentView().BackRequested += SystemNavigationManagerBackRequested; Loaded += (s, e) => { Vm.RunClock(); }; }