Note that there are some explanatory texts on larger screens.

plurals
  1. POwpf is it possible to have a resizable horizontal expander?
    text
    copied!<p>I'm new to WPF. I was able to found out how to do a resizable vertical expander from here: <a href="https://stackoverflow.com/questions/5553383/combine-expander-and-grid-resizable-expander">Combine expander and grid (resizable expander)</a></p> <p>So I thought making a horizontal would be easy, I have tried different ways with no success.</p> <p>Can it be done without complex code? <strong>To have a glidsplitter between 2 grid rows which one of them has an expander</strong></p> <hr> <p>The layout looks like this:</p> <p>Left expander/gridsplitter works fine. But the expander/gridsplitter at the bottom does not. It works fine without a gridsplitter though.</p> <p><img src="https://i.stack.imgur.com/S0n1W.png" alt="enter image description here"></p> <p>My XAML:</p> <pre><code>&lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="*" /&gt; &lt;RowDefinition Height="10" /&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;DockPanel Grid.Row="0"&gt; &lt;Expander ExpandDirection="Left" Header=""&gt; &lt;Expander.Content&gt; &lt;Grid&gt; &lt;!-- this works --&gt; &lt;/Grid&gt; &lt;/Expander.Content&gt; &lt;/Expander&gt; &lt;TextBox AcceptsReturn="True" /&gt; &lt;/DockPanel&gt; &lt;GridSplitter Grid.Row="1" Height="10" HorizontalAlignment="Stretch" ResizeBehavior="PreviousAndCurrent" ResizeDirection="Rows"/&gt; &lt;DockPanel Grid.Row="2"&gt; &lt;Expander ExpandDirection="Down" Header="Summary"&gt; &lt;Expander.Content&gt; &lt;TextBox AcceptsReturn="True" /&gt; &lt;/Expander.Content&gt; &lt;/Expander&gt; &lt;/DockPanel&gt; &lt;/Grid&gt; </code></pre> <p>If you remove the middle row and the gridsplitter, it works fine but it's not resizable.</p> <p>Any help is appreciated.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload