Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to cut TextBox width to prevent out of the Grid?
    primarykey
    data
    text
    <p>I have the next layout</p> <pre><code>&lt;Grid&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="60" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Image Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" Width="60" Height="60" /&gt; &lt;StackPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal"&gt; &lt;TextBlock Text="Title should be long" HorizontalAlignment="Left" /&gt; &lt;Ellipse Fill="White" Stroke="White" Width="7" Height="7" /&gt; &lt;/StackPanel&gt; &lt;TextBlock Grid.Row="1" Grid.Column="1" Text="Message" /&gt; &lt;TextBlock Grid.Row="1" Grid.Column="2" Text="Info" /&gt; &lt;/Grid&gt; </code></pre> <p>I have an issue in the StackPanel which hosts a Title and Ellipse, the goal is the Online marker by the ellipse whitch should be placed at the end off the title. But it shouldn't out of a view part.</p> <p>I have tried to put TextBox and Ellipse into cells of the Grid unfortunatly it doesn't help.</p> <pre><code>&lt;Grid Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2"&gt; &lt;Grid.ColumnsDefinitions&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;/Grid.ColumnsDefinitions&gt; &lt;TextBlock Grid.Column="0" Text="Title should be long" HorizontalAlignment="Left" /&gt; &lt;Ellipse Grid.Column="1" Fill="White" Stroke="White" Width="7" Height="7" /&gt; &lt;/Grid&gt; </code></pre> <p>In my mind it should render correct, but the ellipse is out of view port again.</p> <p>This is a Expression Blend layout scrinshots, the same layout is rendering in runtime.</p> <p>The Grid bounds:</p> <p><img src="https://i.stack.imgur.com/eZCQv.jpg" alt="enter image description here"></p> <p>The TextBox bounds:</p> <p><img src="https://i.stack.imgur.com/Vo7Gf.jpg" alt="enter image description here"></p> <p>The Ellipse bounds:</p> <p><img src="https://i.stack.imgur.com/ou004.jpg" alt="enter image description here"></p> <p>So the TextBox and Ellipse is out of the grid :(</p> <p>Update: I need the next behaviour of layout</p> <p>1) Short title, the ellipse attached to the title end</p> <p><img src="https://i.stack.imgur.com/UFGMk.jpg" alt="enter image description here"></p> <p>2) Long title, the ellipse attached to the right side of container</p> <p><img src="https://i.stack.imgur.com/iOLHq.jpg" 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.
 

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