0
我有下面的代碼工作。它正確地保持20像素寬的最小繪圖寬度。但是,我需要設置MinHeight值。我想讓我的MinHeight值保持當前的高度/寬度比。我怎麼做?任何訣竅WPF MinWidth或MinHeight保持高度/寬度比?
<Grid MinWidth="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type c:IWorldAndScreen}}, Path=MetersPerPixel, Converter={StaticResource multiplier}, ConverterParameter=20}">
<Grid.Width>
<MultiBinding Converter="{StaticResource summation}">
<Binding Path="Front" />
<Binding Path="Back" />
</MultiBinding>
</Grid.Width>
<Grid.Height>
<MultiBinding Converter="{StaticResource summation}">
<Binding Path="Left" />
<Binding Path="Right" />
</MultiBinding>
</Grid.Height>
...
</Grid>