如果您运行此代码并最小化/最大化窗口宽度。
<TextBlock TextTrimming="WordEllipsis" >
<Run Text="I want that this rectangle will be placed "/>
<Rectangle Fill="Black" Width="20" Height="10" />
<Run Text=" here when I minimize width of the window"/>
</TextBlock>
你将会看到矩形将会向左侧移动。
这是WPF中的一个bug吗?