Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

maximize window wpf

$
0
0

I have a window with the following properties:

ShowInTaskbar="False"WindowStyle="None"ResizeMode="NoResize"Topmost="True"AllowsTransparency="True"Background="Transparent"

and I want to maximize the window after pressing a button with the following line:

this.WindowState=System.Windows.WindowState.Maximized;

in doing so, the window is positioned me in the upper left but it is not maximized.

also tested with the following lines but did not work:

this.Height=SystemParameters.MaximizedPrimaryScreenHeight;this.Width=SystemParameters.MaximizedPrimaryScreenWidth;this.Top=0;this.Left=0;

Anyone know how to solve it?

Thank you very much.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>