Note that there are some explanatory texts on larger screens.

plurals
  1. POGrid Item Not Visible When Margin Set to Display in Bottom Half Grid
    primarykey
    data
    text
    <p>I have a grid with an overlaying separator which I am using as a cursor for the grid. I am programmatically moving the separator on the grid by setting the margin to a percentage of the grid ActualHeight. This works fine until the margin is set to more than (grid.ActualHeight / 2) at which point the separator is no longer visible.</p> <p>I have tried setting the vertical alignment (which is defaulted to Top) to Bottom or Center and changing the location accordingly with similar results.</p> <p>Is there some reason why the grid hides the separator? And how can I ensure the separator is visible?</p> <p>Thanks, Stuart</p> <p>Edit:</p> <p>Here is the XAML for the grid. Borders are added to the grid programmatically, which is why the grid contains the rows and columns.</p> <pre><code> &lt;Grid Name="graph1" Grid.Row="1" Margin="2" MouseLeftButtonDown="MouseDown" Background="#00000000"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition /&gt; &lt;RowDefinition /&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;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;ColumnDefinition /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Separator Name="graph1Cursor" Grid.RowSpan="5" Grid.ColumnSpan="6" VerticalAlignment="Top"/&gt; &lt;/Grid&gt; </code></pre> <p>And the code I am using for setting the margin:</p> <pre><code> graph1Cursor.Margin = new Thickness(0, y, 0, y); </code></pre> <p>where y is the height of the cursor location with respect to the ActualHeight of the grid.</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.
 

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