Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1540
XamDataPresenter doesn't stretch to fill ContentPane
posted

<igDock:XamDockManager>
  <igDock:XamDockManager.Panes>
    <igDock:SplitPane>
      <igDock:ContentPane>
        <StackPanel Height="300">
          <Button>MyButton</Button>
          <igData:XamDataPresenter>

I have a situation similar to the above where I have a Button and a XamDataPresenter together on a dockable pane. However, with this arrangement, if the records displayed in the XamDataPresenter are more than the height of the pane, no vertical scroll bar appears on the right of the XamDataPresenter. I figured to use a Grid instead of a StackPanel to fix this from here: http://karlshifflett.wordpress.com/category/uncategorized/

But this presents a couple of problems. 1) The Button disappears, and 2) if I undock the pane and make it vertically bigger, the XamDataPresenter doesn't stretch to fill the size of the pane. If I remove the Height attribute from the Grid, its height becomes as big as required to display all records and the pane matches that size even when initially docked, thus resulting in the pane exceeding the size of the browser window and/or screen.

Is it possible to use a StackPanel without the vertical scroll bar disappearing? And in either case, how can I ensure the XamDataPresenter always stretches to the size of the pane but setting the pane to a maximum initial size (so it doesn't stretch to an excessive size just to match the XamDataPresenter displaying all records)?

Many thanks,
Jason