Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
In my WPF application need to change window three type of size when am selecting size in dropdown.

for example 1.samll size - height-190 width-190
medium size - height-210 width-210
Large Size- Height -250 width-250.

but based on selecting size inside window controls should be align accordingly.


What I have tried:

I don't know how to do ,so i added three different of screen .based on dropdown selection am changing screen.

Please help me out this problem ASAP.
Thanks in Advance.
Posted
Updated 5-Mar-20 0:43am
v3
Comments
Richard MacCutchan 5-Mar-20 7:28am    
You should not need to do it. The user will decide how big they want your application on their screen.

1 solution

You can change the windows size in run time pretty easily just by changing your Window properties:

C#
Width = 350;
Height = 350;


In case you are not setting them from the Window's code behind, reference the Window properly, eg.:

C#
window.Width = 350;
window.Height = 350;
 
Share this answer
 

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