C# windows 8 block style layout autosize

**

Windowed

**

**

Maximized

**

I want all the panels to auto size depending of FormWindowState, if is Maximized to adapt the height and width to screen size and look all good and without empty spaces if I will fill all the form with panels.

Answers


you can achieve it by dividing the actual width to a specific percentage of height.

lets say you want your division to be 10/15/45/30

so in code:

double actualItemHeight = this.Height/ 0.10;
double actualItemWidth = this.Width/ 0.10;

i hope you get my point, you can create a method so you can reuse the code.


Need Your Help

Upload image to a database and Display the image

php mysql

i have a html form and i added a {input type="file" name="file"} tag to the form. when i choose an image and hit the submit, how it does submit to the database and how can i retrieve the image to a...

How to pass Date between PHP and Java?

java php android date

I'm building a small webservice and the client is an android client.