我不知道为什么当我停靠在最后一个控制器没有正确停靠时。这是我的DockPanel示例:
<DockPanel>
<Button Content="A" DockPanel.Dock="Right"/>
<Button Content="B" DockPanel.Dock="Right"/>
<Button Content="C" DockPanel.Dock="Right"/>
</DockPanel>
在这个例子中&#34; C&#34;按钮未正确停靠。 你知道怎么解决吗?
答案 0 :(得分:0)
有一个名为LastChildFill
的属性被赋予了错误的默认值。将其设置为false:
<DockPanel LastChildFill="False">
<Button Content="A" DockPanel.Dock="Right"/>
<Button Content="B" DockPanel.Dock="Right"/>
<Button Content="C" DockPanel.Dock="Right"/>
</DockPanel>