所以我有以下内容:
<TextBlock.Text>
<MultiBinding StringFormat="So and so will donate {0:C0}
to {1}, bringing the
total amount to {2:C0}.">
<Binding Path="VisitorTotal" />
<Binding Path="EventName" />
<Binding Path="EventTotal" />
</MultiBinding>
</TextBlock.Text>
我已尝试

,
,\n
,\\n
及其各种组合。什么都不会给我换行。这是什么交易?
答案 0 :(得分:20)
我的偏好是直接使用Environment.NewLine
:
<MultiBinding StringFormat="So and so will donate {0:C0}{3}to {1}, bringing the{3}total amount to {2:C0}.">
<Binding Path="VisitorTotal" />
<Binding Path="EventName" />
<Binding Path="EventTotal" />
<Binding Source="{x:Static System:Environment.NewLine}"/>
</MultiBinding>
但是,您还需要确保TextBlock.TextWrapping
设置正确。