<Button>
<Button.Content>
<MultiBinding StringFormat="{}{0},{1}">
<Binding Path="Width" RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}"/>
<Binding Path="Height" RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type Window}}"/>
</MultiBinding>
</Button.Content>
</Button>
在这里,我尝试将窗口的宽度和高度绑定到按钮内容中,但这没有意义。