<StackPanel Name="mypanel">
<ScrollViewer Height="{Binding ElementName=mypanel, Path=ActualHeight}">
我需要,Height = mypanel.ActualHeight-60
。
我该怎么做?
编辑:
<StackPanel Name="mypanel">
<ContentControl Content="{Binding HeaderPart}" /> <= here must be Expander
<ScrollViewer Height="{Binding ElementName=mypanel, Path=ActualHeight, Converter={StaticResource HeightConverter}}" >
<StackPanel>
</StackPanel>
</ScrollViewer>
当没有Expander
时,一切正常。当Expander
是,mypanel.ActualHeight
,HeightAdjustmentConverter = 0
。
发生了什么?