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
209
Content pane resizes on it's own.
posted

Hello,

I have a ContentPane in a SplitPane that is docked to the bottom. It contains a single read-only RichTextBox that I intend to use for status messages.

When the height of all lines exceeds the visible space of the RichTextBox it resizes itself and with it the whole ContentPane.

This is clearly a bug or, if not, at least an unexpected behaviour, as the size of the Content panes should only depend on the user's setting (By dragging the splitter).

Is there a workaround for that?

Parents
  • 7495
    Offline posted

    Hello ,


    Thank you for posting. The behavior you described is expected because what will happen when no extent is specified is that the element is measured with the available size. In the case of the richtextbox it’s going to try to take as much space as possible to display its content.


    In that case the richTextBox essentially uses all the available width. Now in your case its doc to bottom, the xaml DockPanel that would be like this and as you type you will see that the richtextbox will get taller/smaller.


    <DockPanel LastChildFill="False">
    <RichTextBox Name="RichTextBox1" DockPanel.Dock="Bottom" />
    </DockPanel>

    The corollary in xamDockManager would be:

    <igDock:XamDockManager Name="xamDockManager1">
    <igDock:XamDockManager.Panes>
    <igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedBottom">
    <igDock:ContentPane Header="Pane 1" AllowDockingBottom="true" >
    <RichTextBox Name="RichTextBox1" /> 
    </igDock:ContentPane>
    </igDock:SplitPane>
    </igDock:XamDockManager.Panes>
    </igDock:XamDockManager>
    
    

    If you wants to keep it a fixed size then you can set the Height on that root split pane.
    e.g.

    <igDock:XamDockManager Name="xamDockManager1">
    <igDock:XamDockManager.Panes>
    <igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedBottom" Height="200">
    <igDock:ContentPane Header="Pane 1" AllowDockingBottom="true" >
    <RichTextBox Name="RichTextBox1" /> 
    </igDock:ContentPane>
    </igDock:SplitPane>
    </igDock:XamDockManager.Panes>
    </igDock:XamDockManager>
    

    Let me know if you have any question.


    Thank you,
    Divya Jain

Reply Children