private void FullButton_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } //mediaPlayerElement.IsFullWindow = !mediaPlayerElement.IsFullWindow; }
void SetFill(PrimaryPlayerDisplayMode currentMode) { if (_view.ViewMode == ApplicationViewMode.CompactOverlay) { _ = _view.TryEnterViewModeAsync(ApplicationViewMode.Default); } if (_view.IsFullScreenMode && ApplicationView.PreferredLaunchWindowingMode != ApplicationViewWindowingMode.FullScreen ) { _view.ExitFullScreenMode(); } }
public void FullScreenButton_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } }
private void ToggleFullscreenMode() { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); mpe.IsFullWindow = false; } else { view.TryEnterFullScreenMode(); TryRemoveUI(); } }
public void ShowFullScreen() { ApplicationView appView = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = appView.IsFullScreenMode; if (isInFullScreenMode) { appView.ExitFullScreenMode(); } else { appView.TryEnterFullScreenMode(); } }
private async void SetWindowState(WindowState value) { await _swp.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { ApplicationView av = ApplicationView.GetForCurrentView(); if (value == WindowState.FullScreen) { av.TryEnterFullScreenMode(); } else { av.ExitFullScreenMode(); } }); }
// public bool IsReady { get; set; } public MainPage() { this.InitializeComponent(); ApplicationView view = ApplicationView.GetForCurrentView(); bool IsInFullScreenMode = view.IsFullScreenMode; if (IsInFullScreenMode) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } }
public void setFullScreen() { ApplicationView current_window = ApplicationView.GetForCurrentView(); app_data.ISFULLSCREEN = current_window.IsFullScreenMode; if (app_data.ISFULLSCREEN) { current_window.ExitFullScreenMode(); } else { current_window.TryEnterFullScreenMode(); } app_data.ISFULLSCREEN = current_window.IsFullScreenMode; }
private void toggleSwitchFullScreen_Toggled(object sender, RoutedEventArgs e) { view = ApplicationView.GetForCurrentView(); localSettings = ApplicationData.Current.LocalSettings; if (toggleSwitchFullScreen.IsOn == true) { localSettings.Values["isFullScreenMode"] = "true"; view.TryEnterFullScreenMode(); } else { localSettings.Values["isFullScreenMode"] = "false"; view.ExitFullScreenMode(); } }
public static void SetFullScreen(bool fullScreen) { if (fullScreen) { if (ApplicationView.TryEnterFullScreenMode()) { ApplicationView.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); Microsoft.AppCenter.Analytics.Analytics.TrackEvent("Full screen entered"); } } else { ApplicationView.ExitFullScreenMode(); ApplicationView.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseVisible); } }
// WebView 中的内容进入全屏或退出全屏时触发的事件 private void WebView1_ContainsFullScreenElementChanged(WebView sender, object args) { ApplicationView applicationView = ApplicationView.GetForCurrentView(); // WebView 中的内容处于全屏状体 if (sender.ContainsFullScreenElement) { // 将 app 设置为全屏模式 applicationView.TryEnterFullScreenMode(); } else { // 将 app 退出全屏模式 applicationView.ExitFullScreenMode(); } }
private void MyFullButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isFull = view.IsFullScreenMode; if (!isFull) { view.TryEnterFullScreenMode(); view.FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Standard; } else { view.ExitFullScreenMode(); } Fulled?.Invoke(this, EventArgs.Empty); }
private void btnMode_Tapped(object sender, TappedRoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { view.ExitFullScreenMode(); btnMode.Content = "View Full Screen Mode"; } else { view.TryEnterFullScreenMode(); btnMode.Content = "Exit Full Screen Mode"; } }
private void JellyfinWebView_ContainsFullScreenElementChanged(Windows.UI.Xaml.Controls.WebView sender, object args) { ApplicationView appView = ApplicationView.GetForCurrentView(); if (sender.ContainsFullScreenElement) { appView.TryEnterFullScreenMode(); return; } if (!appView.IsFullScreenMode) { return; } appView.ExitFullScreenMode(); }
private void fullScreen_Click(object sender, RoutedEventArgs e) { if (picture.Visibility != Visibility.Visible) { mediaPlayer.IsFullWindow = !mediaPlayer.IsFullWindow; } ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode == true) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } }
private void display_button_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { view.ExitFullScreenMode(); display_button.FontFamily = new FontFamily("Segoe MDL2 Assets"); display_button.Content = "\uE740"; } else { view.TryEnterFullScreenMode(); display_button.FontFamily = new FontFamily("Segoe MDL2 Assets"); display_button.Content = "\uE73F"; } }
private void MainPage_Loaded(object sender, RoutedEventArgs e) { view = ApplicationView.GetForCurrentView(); localSettings = ApplicationData.Current.LocalSettings; object value = localSettings.Values["isFullScreenMode"]; if (value != null) { if (value.ToString() == "true") { view.TryEnterFullScreenMode(); } else if (value.ToString() == "false") { view.ExitFullScreenMode(); } } }
private async void OnKeyDown(object sender, KeyRoutedEventArgs e) { ApplicationView applicationView = ApplicationView.GetForCurrentView(); if (e.Key == Windows.System.VirtualKey.Escape && applicationView.IsFullScreenMode) { applicationView.ExitFullScreenMode(); } else if (e.Key == Windows.System.VirtualKey.Escape && applicationView.ViewMode == ApplicationViewMode.CompactOverlay) { MyCanvas.Margin = new Thickness(-16, -8, -16, -8); await applicationView.TryEnterViewModeAsync(ApplicationViewMode.Default); } else if (e.Key == Windows.System.VirtualKey.Space) { TogglePlaying(); } }
private void FullScreen_Toggled(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { BtnCloseApp.Visibility = Visibility.Collapsed; view.ExitFullScreenMode(); localSettings.Values["FullScrenn"] = 0; } else { BtnCloseApp.Visibility = Visibility.Visible; view.TryEnterFullScreenMode(); localSettings.Values["FullScrenn"] = 1; } }
private void Button_FullScreenMode_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { view.ExitFullScreenMode(); TextBlock_FullScreenModeTip.Text = "全屏"; FontIcon_FullScreenMode.Glyph = "\xE740"; } else { view.TryEnterFullScreenMode(); TextBlock_FullScreenModeTip.Text = "退出全屏"; FontIcon_FullScreenMode.Glyph = "\xE73F"; } }
private void display_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { ImageBrush imageBrush = new ImageBrush(); imageBrush.ImageSource = new BitmapImage(new Uri("ms-appx:///Assets/3.jpg", UriKind.Absolute)); MyGrid.Background = imageBrush; MyGrid.Background.Opacity = 0.5; view.ExitFullScreenMode(); } else { MyGrid.Background = new SolidColorBrush(Colors.Black);// Windows.UI.Xaml.Media.Brush view.TryEnterFullScreenMode(); } }
private void menu_fullscreen(object sender, RoutedEventArgs e) { linha = false; circulo = false; quadrado = false; retangulo = false; color = false; texto = false; ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } }
private void fullScreen_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); if (!flag) { return; } if (view.IsFullScreenMode) { mediaElement.IsFullWindow = false; view.ExitFullScreenMode(); } else { mediaElement.IsFullWindow = true; view.TryEnterFullScreenMode(); } }
private void txt_Nombre_KeyDown(object sender, KeyRoutedEventArgs e) { if (e.Key == Windows.System.VirtualKey.Escape) { ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { view.ExitFullScreenMode(); display_button.FontFamily = new FontFamily("Segoe MDL2 Assets"); display_button.Content = "\uE740"; } //else //{ // view.TryEnterFullScreenMode(); // display_button.FontFamily = new FontFamily("Segoe MDL2 Assets"); // display_button.Content = "\uE73F"; //} } }
//全屏/退出全屏操作 private void scale_Click(object sender, RoutedEventArgs e) { SymbolIcon icon = (SymbolIcon)scale.Icon; ApplicationView view = ApplicationView.GetForCurrentView(); if (icon.Symbol == Symbol.FullScreen) { view.TryEnterFullScreenMode(); icon.Symbol = Symbol.BackToWindow; scale.Label = "退出全屏"; mediaSlider.Visibility = Visibility.Collapsed; //进入全屏时,隐藏进度条 showSlider.Label = "显示进度条"; } else { view.ExitFullScreenMode(); icon.Symbol = Symbol.FullScreen; scale.Label = "全屏"; mediaSlider.Visibility = Visibility.Visible; //退出全屏时,显示进度条 showSlider.Label = "隐藏进度条"; } }
private void AdjustScreenMode() { try { bool isPhone = ApiInformation.IsApiContractPresent("Windows.Phone.PhoneContract", 1); ApplicationView view = ApplicationView.GetForCurrentView(); if (!isPhone) { if (view.IsFullScreenMode) { view.ExitFullScreenMode(); } } else { ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen; } } catch (Exception) { } }
static void FullScreen(object sender, RoutedEventArgs e) { var button = sender as Button; ApplicationView view = ApplicationView.GetForCurrentView(); bool isInFullScreenMode = view.IsFullScreenMode; if (isInFullScreenMode) { view.ExitFullScreenMode(); button.Content = "FullScr"; view.ShowStandardSystemOverlays(); } else { view.FullScreenSystemOverlayMode = FullScreenSystemOverlayMode.Minimal; view.TryEnterFullScreenMode(); var bar = view.TitleBar; bar.BackgroundColor = Color.FromArgb(0, 0, 0, 0); button.Content = "Windowed"; } }
private void ChangeFullScreen(object sender, ManipulationCompletedRoutedEventArgs e) { //await new MessageDialog("getgetget!\n", "getgetget").ShowAsync(); if (e.Cumulative.Expansion > 50) { ApplicationView view = ApplicationView.GetForCurrentView(); if (!view.IsFullScreenMode) { if (view.TryEnterFullScreenMode()) { ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen; } } } else if (e.Cumulative.Expansion < -50) { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.Auto; } } }
private void display_Click(object sender, RoutedEventArgs e) { ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { ImageBrush imageBrush = new ImageBrush { ImageSource = new BitmapImage(new Uri("ms-appx:///Assets/music.jpg", UriKind.Absolute)) }; grid.Background = imageBrush; view.ExitFullScreenMode(); } else { if (!IsAudio()) { grid.Background = new SolidColorBrush(Colors.Black); rotatePic.Visibility = Visibility.Collapsed; EllStoryboard.Stop(); } view.TryEnterFullScreenMode(); } }
/// <summary> /// Touche pressée /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnKeyDown(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.KeyEventArgs e) //private void OnKeyDown(object sender, KeyRoutedEventArgs e) { if (haveFocus == false) { return; } //if (e.VirtualKey != VirtualKey.GamepadRightShoulder) //{ // Debug.WriteLine(e.VirtualKey + " " + e.KeyStatus.ScanCode); //} //var virtualKey = e.VirtualKey; //switch(e.KeyStatus.ScanCode) //{ // case 44: // W en français, Z en anglais, .. // virtualKey = VirtualKey.W; // break; // case 45: // X en français, ? en anglais, .. // virtualKey = VirtualKey.X; // break; //} switch (e.VirtualKey) { case VirtualKey.Up: keyboardGamepad.Press(GamepadKeys.Up); break; case VirtualKey.Down: keyboardGamepad.Press(GamepadKeys.Down); break; case VirtualKey.Right: keyboardGamepad.Press(GamepadKeys.Right); break; case VirtualKey.Left: keyboardGamepad.Press(GamepadKeys.Left); break; case VirtualKey.Z: case VirtualKey.W: case VirtualKey.Y: keyboardGamepad.Press(GamepadKeys.ButtonA); break; case VirtualKey.X: keyboardGamepad.Press(GamepadKeys.ButtonB); break; case VirtualKey.Space: keyboardGamepad.Press(GamepadKeys.ButtonStart); break; // pleine écran case VirtualKey.F11: try { // alt (pour alt+entrée) est compliqué à trouver, on verra plus tard... ApplicationView view = ApplicationView.GetForCurrentView(); if (view.IsFullScreenMode) { view.ExitFullScreenMode(); } else { view.TryEnterFullScreenMode(); } } catch { } break; } }