Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is a bit of a hack that seems to work well. If you place a background element in the rows / columns along with the elements you normally would place there, it will act as a background. You'll just need to mind the ordering of the elements in the XAML (the elements appear in increasing Z-Order), or set the Panel.Zorder accordingly.</p> <pre><code>&lt;Window x:Class="gridBackground.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"&gt; &lt;Grid&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition/&gt; &lt;RowDefinition/&gt; &lt;RowDefinition/&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition/&gt; &lt;ColumnDefinition/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Border Background="Red" /&gt; &lt;Border Grid.Row="2" Grid.Column="1" Background="Red" /&gt; &lt;Border Grid.Row="1" Background="LightBlue" /&gt; &lt;Border Grid.Row="2" Background="Orange" /&gt; &lt;Border Grid.Row="0" Grid.Column="1" Background="Orange" /&gt; &lt;TextBlock Grid.ColumnSpan="2" Grid.Row="1" Text="Here is some more text" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt; &lt;TextBlock Grid.ColumnSpan="2" Text="Here is some text" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt; &lt;TextBlock Grid.ColumnSpan="2" Grid.Row="2" Text="Here is even more text" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt; &lt;/Grid&gt; &lt;/Window&gt; </code></pre> <p>It looks like this:</p> <p><img src="https://i.stack.imgur.com/W1u6j.png" alt="enter image description here"></p>
    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. 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.
    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