我正在尝试根据Customer
Window 的 DependancyProperty 是否为空来创建拖动装饰器。我在Window的资源中有这个。绑定的第一部分已设置(被拖动的项目),但第二部分(窗口上的 DependancyProperty)显示为 UnsetValue。
该属性肯定被初始化,因为它被用作窗口的数据上下文。
<Window x:Name="root"
...
>
<Window.Resources>
<DataTemplate x:Key="DragAdorner">
<StackPanel Orientation="Horizontal">
<TextBlock>
<TextBlock.Text>
<MultiBinding Converter="{StaticResource vehicleDragConverter}">
<Binding/>
<Binding Path="Customer" ElementName="root"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</StackPanel>
</DataTemplate>