以下に定義されているComboBoxのTextプロパティのDataContentを取得する方法はコードにありますか?
<ComboBox Height="21" Text="{Binding Path=Field1.Value}">
<ComboBox.Resources>
<Style TargetType="ComboBox">
<Setter Property="IsEnabled" Value="False" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Field2.Value}" Value="">
<Setter Property="IsEnabled" Value="True" />
</DataTrigger>
</Style.Triggers>
</Style>
</ComboBox.Resources>
</ComboBox>
現在、ComboBoxのDataContextは、それが存在するユーザーコントロールです。Textを1つのプロパティにバインドし、DataTriggerを別のプロパティにバインドする必要があるため、これは理にかなっています。ただし、TextプロパティにバインドされているDataContextを取得する必要があります。