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
655
Setting a minimum size for ContentPane?
posted

One of the features that seems to be lacking (or im not figuring out how to use) is around not allowing a ContentPane to shrink beyond a certain minimum size. Right now it seems to ignore the MinWidth and MinHeigth property, i can resize the splitter to hide my pane.

I've tried setting the MinWidth at various levels of the xaml around the pane (for example on its parent TabGroupPane, or SplitPane) but nothing works.

Parents
  • 54937
    Offline posted

    Yes currently there is no way to specify a constraining width. The reason is that there is no way to propogate the MinWidth/MinHeight of an element nested somewhere within. So for example if you had set a MinWidth on the ContentPane that was within a TabGroupPane, neither the TabGroupPane nor the SplitPane would know about it - their MinWidth/MinHeight just reflects what has been set on them and since elements like the TabGroupPane may be retemplated and the template will determine how much "chrome" would be around the content (and that chrome could even change based on state via triggers/vsm) there really isn't any way for the tabgroup to try and calculate a min width/height considering the children nested within. WPF just uses the MinWidth/MinHeight during the measure to constraint the availableSize that is passed along to an element's measureoverride.

Reply Children