WIN10 can be full screen software or form. Forms are general, minimized, and maximized. We have new API settings our software is full screen, is the form.
We can use to ApplicationView
let our software fullscreen, cancel.
Here is a simple sample that infers that our software is not fullscreen, assuming that it is not fullscreen, code in a ToggleButton
ApplicationView view = ApplicationView.GetForCurrentView();bool isInFullScreenMode = view.IsFullScreenMode;if (isInFullScreenMode) { view.ExitFullScreenMode();}else { view.TryEnterFullScreenMode();}
Isfullscreenmode
is true. Apply full screen now
exitfullscreenmode
exit full screen
tryenterfullscreenmode
go full screen, go full screen success true
If you need to know the form changes, you can register Window.Current.SizeChanged
public Class Isfullscreenmodetrigger:statetriggerbase {public isfullscreenmodetrigger () {Applicationview view = Applicationview.getforcurrentview (); SetActive (view. Isfullscreenmode); Window.Current.SizeChanged + = currentwindow_sizechanged; } private void Currentwindow_sizechanged (object sender, Windows.UI.Core.WindowSizeChangedEventArgs e) {Applicationview view = Applicationview.getforcurrentview (); SetActive (view. Isfullscreenmode); }}
<Grid Background="{ThemeResource Applicationpagebackgroundthemebrush}"> <visualstatemanager.visualstategroups> <visualstategroup> <visualstate x:name="Infullscreen"> <visualstate.statetriggers> <local:isfullscreenmodetrigger /> </visualstate.statetriggers> <visualstate.setters> <Setter Target="Isfullscreentext.text" Value= "in full screenmode" /> </visualstate.setters> </visualstate> </visualstategroup> </visualstatemanager.visualstategroups> <StackPanel horizontalalignment="Center"> <button click="Button_Click"Content="Togglefull Screen" > </Button> <TextBlock x:name="Isfullscreentext"FontSize=" the" textwrapping="Wrap"Text= "Not on full screenmode"/> </StackPanel></Grid>
When our application becomes full screen, TextBlock willIn full screen mode
We are able to set the PreferredLaunchWindowingMode
open in our app
ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen;
Applicationviewwindowingmode is able Auto
to PreferredLaunchViewSize
set the form and ApplicationView.PreferredLaunchViewSize
, assuming that no settings ApplicationView.PreferredLaunchViewSize
are used last close the form,FullScreen
Win10 has a very easy API to be able to apply fullscreen to the PC. We often use forms, and phones often use full screen.
http://igrali.com/2015/06/21/full-screen-mode-in-windows-10-universal-apps/
Win10 UWP fullscreen