<StackPanel Name="mypanel">
<ScrollViewer Height="{Binding ElementName=mypanel, Path=ActualHeight}">
I need, Height = mypanel.ActualHeight-60.
How can I do it?
EDIT:
<StackPanel Name="mypanel">
<ContentControl Content="{Binding HeaderPart}" /> <= here must be Expander
<ScrollViewer Height="{Binding ElementName=mypanel, Path=ActualHeight, Converter={StaticResource HeightConverter}}" >
<StackPanel>
</StackPanel>
</ScrollViewer>
When there is no Expander, all is working. When the Expander is, mypanel.ActualHeight, HeightAdjustmentConverter = 0.
What happened?
You need to write an IValueConverter that takes in the
ActualHeightand returns a new value of that minus 60.Something like: