What do I have:
<Grid HorizontalAligment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="16" />
</Grid.ColumnDefinitions>
<TextBlock Text="Text" Grid.Column="0" />
<Grid Background="Black" VerticalAligment="Stretch" Grid.Column="1">
<TextBlock Text="*" />
</Grid>
</Grid>
Result:
__________
| |
|Text * |
|________|
I have a problem: when text is too wide, * becomes off screen.
__________
| |
|long Tex|t *
|________|
So, how to specify that * should overlay part of the Text if it becomes off screen?
__________
| |
|long Te*|t
|________|
The second problem: I cannot use MaxWidth for the Text, because Grid has a dynamic width.
UPD: If I would use Width="*" for the first column, I will get this:
__________
| |
|Text *|
|________|
Use the following
Instead of
Edit:
Here is the full code:
The output is the following. 123 is start of the text. Is this not what you’re expecting?