WPF アプリでフィールドからフィールドへタブを移動すると、各フィールドに関連付けられたラベルが強調表示されます。これは、ComboBox と TextBox の項目では正常に機能しますが、ListViews や DatePicker では機能しません。Label タグのバインディング部分で IsFocused パス部分を利用しています (以下のコードを参照)。
<Label
Style="{StaticResource styleLabelTextBlockLeft}"
Target="{Binding ElementName=dpBrthDt}"
Tag="{Binding ElementName=dpBrthDt, Path=(IsFocused)}"
>
<TextBlock
TextWrapping="Wrap">When were you born?
</TextBlock>
</Label>
<DatePicker
x:Name="dpBrthDt"
HorizontalAlignment="Left"
SelectedDate="{Binding
Path=CurrentEntity.BrthDt,
Mode=TwoWay,
ValidatesOnDataErrors=True,
NotifyOnValidationError=True
}"
Width="115"
/>
IsFocused を参照する Tag の Binding 部分が、DatePickers/ListViews ではなく TextBoxes/ComboBoxes で機能する理由はありますか? ありがとう。