Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to set default full screen resolution in wpf application
this application show full screen in any desktop resolution
in my application my default resolution is (750,1360)
but when i run this application other desktop they can't show properly
i want this application show full screen at any desktop
Posted

If i understand you well, you want to change the size of windows application, not the screen resolution. You want to achieve something similar to maximize mode in "normal" windows forms.

I would recommend you to read these articles:
WPF Windows Overview[^]
Customizing Controls For Windows Presentation Foundation[^]
WPF and Windows Forms Interoperation[^]

Adjust the height of the WPF window Automatically based on window size ![^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Dec-13 11:27am    
Useful links, a 5.
—SA
Maciej Los 11-Dec-13 14:28pm    
Thank you, Sergey ;)
Nothing should ever change screen resolution on the application level, as it can disrupt other application without the user consent. User and only the user should change screen properties, which is done through the control panel.

Instead of trying to do such weird and not legitimate thing, you should develop your application the way they easily adopt any screen size. For some ideas, please see my past answers:
Zom Out malfunctions when Screen resolution changes[^],
GUI Apperance - C#.Net[^].

[EDIT]

You can simply maximize the window size or adjust it according to current the screen size in pixels:
http://msdn.microsoft.com/en-us/library/system.windows.window.windowstate%28v=vs.110%29.aspx[^] (to maximize/restore, etc.),
http://stackoverflow.com/questions/1927540/how-to-get-the-size-of-the-current-screen-in-wpf[^].

—SA
 
Share this answer
 
v2
Comments
Maciej Los 10-Dec-13 15:59pm    
On the first look, you have misunderstood with OP. I think OP wants to change the size of application window, not screen resolution. Please, see the question one more time.
Sergey Alexandrovich Kryukov 10-Dec-13 18:16pm    
Not quite: first line of the question says: "how to set default full screen resolution in wpf application".
Nevertheless, I updated the answer, please see.
Thank you for this tip.
—SA
Maciej Los 11-Dec-13 5:38am    
"i want this application show full screen at any desktop" - it was the most important sentence for me ;)
Sergey Alexandrovich Kryukov 11-Dec-13 10:39am    
Didn't I answer, too? Do we have to argue if some inquirer asks about different things, possibly contradictory. None of them has to be "main"...
—SA
Maciej Los 11-Dec-13 11:12am    
Yes, you did. And i do not quarrel with you, i hope. There is no "main" thing. There is a context of OP's statement.
BTW: +5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900