-
I'm experimenting as in the subject and I managed to get in fullscreen in WASM and in a native windows application.
To do the same in native windows:
note I had to add a Presenter property in the App class
I created a small app to illustrate the concepts. I would like to do the same for the Desktop application in windows enviroment but I have not fond a way, any suggestion? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
I'm using this code to maximize a desktop app in my linux device: if (Environment.OSVersion.Platform == PlatformID.Unix) {
ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
} |
Beta Was this translation helpful? Give feedback.
-
@emem67 Try this: 1- Add a public void MaximizeWindow()
{
var appWindow = MainWindow?.AppWindow ?? throw new InvalidOperationException("AppWindow is null");
MainWindow?.DispatcherQueue.TryEnqueue(() =>
{
if (appWindow.Presenter is FullScreenPresenter)
{
appWindow.SetPresenter(AppWindowPresenterKind.Overlapped);
}
else
{
appWindow.SetPresenter(AppWindowPresenterKind.FullScreen);
}
});
} 2- Change the ViewModel #if HAS_UNO_SKIA
var app = Application.Current as App;
app?.Maximize(); |
Beta Was this translation helpful? Give feedback.
@emem67 Try this:
1- Add a
Maximize()
method to theApplication
class: (I would move the logic for all TFM here.)2- Change the ViewModel