Binding only part of the margin property of WPF control
问题 I have this: <TabControl Margin="0,24,0,0">...</TabControl> I want to bind only the "Top" part of the TabControl, which intuitively I would do it this way: <TabControl Margin="0,{Binding ElementName=TheMenu, Path=Height},0,0"> ... </TabControl> How do I do it ? 回答1: Have you tried using a converter like this? in VB.Net Public Class MarginConverter Implements IValueConverter Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture