WPF layout with several fixed height parts and certain parts relative to window size

Posted by Daniil Harik on Stack Overflow See other posts from Stack Overflow or by Daniil Harik
Published on 2010-06-15T13:53:11Z Indexed on 2010/06/15 14:02 UTC
Read the original article Hit count: 407

Filed under:
|
|
|
|

Hello,

At moment my main layout consists of vertically oriented stack panel and it looks like this:

Root StackPanel

  • StackPanel - fixed Height 150 (horizontal orientation)

  • StackPanel - relative Height must be behalf of free space left on screen (but at least 150 px). Used by Telerik GridView Control, if I don't specify Height or MaxHeight Telerik GridView Height becomes very large and does not fit my window.

  • StackPanel - fixed Height 100 (horizontal orientation)

  • StackPanel - relative Height must be half of free space left on screen (but at least 150 px). Used by Telerik GridView Control, if I don't specify Height or MaxHeight Telerik GridView Height becomes very large and does not fit my window.

  • StackPanel - fixed Height 100 (horizontal orientation)

The view must totally fit available screen size.

The problem is that I don't understand how to make certain areas of my view resize depending on available screen size.

Is there is easy way to solve it, or should I be binding to Window height property and doing math?

Thank You very much!

© Stack Overflow or respective owner

Related posts about wpf

Related posts about gridview