3
調試綁定時就是這個樣子WPF - 安裝調試綁定綁定是在不串
IsChecked="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type ListBoxItem}}, Mode=TwoWay, Path=IsSelected}"
容易。您添加以下內容:
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
IsChecked="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type ListBoxItem}}, Mode=TwoWay,
Path=IsSelected,diagnostics:PresentationTraceSources.TraceLevel=High}"
但你如何附加「調試」當你的結合看起來是這樣的:
<DataTemplate.Triggers>
<DataTrigger Value="True">
<DataTrigger.Binding>
<MultiBinding Converter="{StaticResource DisableWorkItemConverter}">
<Binding ElementName="MainForm" Path="PickedWorkItemID"/>
<Binding Path="WorkItemForColumn.Id"/>
</MultiBinding>
</DataTrigger.Binding>
<Setter Property="IsEnabled" Value="False"/>
<Setter Property="loc:Main.IsCurrentItemEnabledChanged" Value="True"/>
</DataTrigger>
</DataTemplate.Triggers>
這樣做。謝謝! – Vaccano 2009-12-29 17:22:12