假设我有以下 XAML。
我怎样才能实现最外层Button
具有这样的高度,以便文本TextBlock
完全可见?
<StackPanel>
<Button HorizontalContentAlignment="Stretch" Width="100" >
<DockPanel >
<CheckBox DockPanel.Dock="Left"/>
<Button DockPanel.Dock="Right" Content="X" />
<TextBlock >
some very long text some very long textsome very long textsome very long textsome very long text
</TextBlock>
</DockPanel>
</Button>
</StackPanel>