Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It sounds like you want a <code>StackPanel</code> where the final element uses up all the remaining space. But why not use a <code>DockPanel</code>? Decorate the other elements in the <code>DockPanel</code> with <code>DockPanel.Dock="Top"</code>, and then your help control can fill the remaining space.</p> <p>XAML:</p> <pre><code>&lt;DockPanel Width="200" Height="200" Background="PowderBlue"&gt; &lt;TextBlock DockPanel.Dock="Top"&gt;Something&lt;/TextBlock&gt; &lt;TextBlock DockPanel.Dock="Top"&gt;Something else&lt;/TextBlock&gt; &lt;DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="Auto" Margin="10"&gt; &lt;GroupBox DockPanel.Dock="Right" Header="Help" Width="100" Background="Beige" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" Height="Auto"&gt; &lt;TextBlock Text="This is the help that is available on the news screen." TextWrapping="Wrap" /&gt; &lt;/GroupBox&gt; &lt;StackPanel DockPanel.Dock="Left" Margin="10" Width="Auto" HorizontalAlignment="Stretch"&gt; &lt;TextBlock Text="Here is the news that should wrap around." TextWrapping="Wrap"/&gt; &lt;/StackPanel&gt; &lt;/DockPanel&gt; &lt;/DockPanel&gt; </code></pre> <p>If you are on a platform without <code>DockPanel</code> available (e.g. WindowsStore), you can create the same effect with a grid. Here's the above example accomplished using grids instead:</p> <pre><code>&lt;Grid Width="200" Height="200" Background="PowderBlue"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto"/&gt; &lt;RowDefinition Height="*"/&gt; &lt;/Grid.RowDefinitions&gt; &lt;StackPanel Grid.Row="0"&gt; &lt;TextBlock&gt;Something&lt;/TextBlock&gt; &lt;TextBlock&gt;Something else&lt;/TextBlock&gt; &lt;/StackPanel&gt; &lt;Grid Height="Auto" Grid.Row="1" Margin="10"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;ColumnDefinition Width="100"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;GroupBox Width="100" Height="Auto" Grid.Column="1" Background="Beige" Header="Help"&gt; &lt;TextBlock Text="This is the help that is available on the news screen." TextWrapping="Wrap"/&gt; &lt;/GroupBox&gt; &lt;StackPanel Width="Auto" Margin="10" DockPanel.Dock="Left"&gt; &lt;TextBlock Text="Here is the news that should wrap around." TextWrapping="Wrap"/&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/Grid&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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