WPF Fill Window

  • Thread starter Thread starter Bill McCormick
  • Start date Start date
B

Bill McCormick

How can I make a control (panel, grid, dock) fill an entire window other
than setting height/width properties?
 
Andy said:
Well, one way would be to add a Dockpanel to the window, and put the
content in that.
Right, that's what I'm trying to do. But what properties tell the Dock
panel to *Fill* the Window?
 
Hold the phone, I got it:

<DockPanel Name="dockPanel1" Height="Auto" Width="Auto"
LastChildFill="False" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" />

Thanks for trying.


Bill
 
I'd axe all the properties you set on the DockPanel, except for the
Name. At the very least, I don't know why you have
Grid.IsSharedSizeScope set at all, since there's no grid on your
window.

What are you trying to do?
 
Hi Andy,
Ur post solved my question. However, I want my output window to be maximized for the user's convenience. After using the dockpanel control, my contents inside the dockpanel occupy the space as expected but my dockpanel itslef does not occupy the wntire output window.

Dockpanel occupies the central portion of the maximized output window. Can you help me with it?

Thanks,
Rucha
 
Back
Top