Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Full screen in WPF application

I am developing a WPF application which will be displayed in Full screen. In addition, the application should work on many tablets of multiple dimensions. I'd like my application to run in full screen independently from its dimensions.

What is the best practice to accomplish this task?

like image 562
Lamloumi Afif Avatar asked Apr 10 '13 07:04

Lamloumi Afif


People also ask

How do I make my WPF window full screen?

Just set the WindowState to Maximized , and the WindowStyle to None . Also setting the Window as topmost will make sure no other Window shows up over your window.

How do I open a new window in WPF?

You will need to create an instance of a new window like so. var window2 = new Window2(); Once you have the instance you can use the Show() or ShowDialog() method depending on what you want to do. var result = window2.

How do I close a WPF window?

window. ShowDialog(); Close method of the Window class is used to close a window.

Is WPF a framework?

Windows Presentation Foundation (WPF) is a UI framework that creates desktop client applications. The WPF development platform supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding, documents, and security.


2 Answers

Just set the WindowState to Maximized, and the WindowStyle to None.

like image 139
Thomas Levesque Avatar answered Oct 20 '22 02:10

Thomas Levesque


Set the WindowStyle to None, and the WindowState to Maximized. This can be done like this:

WindowState = WindowState.Maximized;
WindowStyle = WindowStyle.None;

Or in xaml:

<Window x:Class="FullScreenApplication.Window"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Full Screen WPF"
    WindowState="Maximized"
    WindowStyle="None">

And simply click ALT-TAB to escape from your full screen wpf. It allows you to switch between other applications.

like image 49
Kurt Van den Branden Avatar answered Oct 20 '22 01:10

Kurt Van den Branden