in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Relative sizing of Layout Control empty space.

Last post 10/25/2008 1:24 PM by Pavel. 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 10/23/2008 6:43 AM

    Relative sizing of Layout Control empty space.

    Hi

    I'm not clear on how to set a relative size, like a width %, on a layout control, or if there's another method of doing this. E.g...

    |-- Empty Space 1 --|-- Some Control (Layout Item 1) --|-- Empty Space 2 --|

    So If I set "Layout Item 1" here to a fixed width the empty space items will fill the width of the screen no probs. The problem I find is that if "Empty Space 1" is slightly smaller than "Empty Space 2" the differences in sizes will remain as the form is made smaller/larger.

    From this I've got two questions...

    1. How can I get the two empty space to have the same relative width, regardless of the fixed width of "Layout Item 1"?

    2. How could I get all three of the above spaces, if "Layout Item 1" did not have a fixed width, to have an equal relative space, such as |30%|30%|30%|, or |40%|20%|40%|?

    Thanks!

  • 10/25/2008 1:24 PM In reply to

    • Pavel
    • Top 200 Contributor
    • Joined on 7/5/2007
    • Posts 55

    Re: Relative sizing of Layout Control empty space.

    The simplest solution of this issue is not to limit middle item  horizontal sizing. Set MinSize to that item, set MaxSize.Width to 0 and use the LayoutControlItem.ControlAlignment property to align control to the center of the item. Let me know if the idea is clear for you.

    WPF HATER BLOG
    http://wpfhater.blogspot.com/
Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED