I would like to have some wrapped text followed by a button, but I want the button to appear immediately after the last line of text. Kind of like this:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. [The Button]
Here is my current attempt at doing so, but the button always shows up on the next line, not in-line with the last sentence. I thought that WrapPanel would have take care of this, but I'm assuming that the bounding box for TextBlock is filling the whole row.
<toolkit:WrapPanel Orientation="Horizontal"
Visibility="{Binding HasErrorMessage,
Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
<TextBlock
Foreground="{StaticResource ErrorColorBrush}" TextWrapping="Wrap"
Text="{Binding ErrorMessage, Mode=OneWay}"/>
<Button
Click="ClearErrorButton_Click"
Content="Clear Error"/>
</toolkit:WrapPanel>
The incorrect output looks something like this:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
[The Button]