【发布时间】:2013-08-05 07:42:34
【问题描述】:
<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。
发生了什么?
【问题讨论】:
标签: c# wpf scrollviewer stackpanel