I’m building a login screen in WPF. I’m trying to figure out how to bind a part of my code to only be visible when the caps lock key is on.
<StackPanel Grid.Row="3" Grid.ColumnSpan="2" Grid.Column="1" Orientation="Horizontal">
<Image Source="../../../Resources/Icons/109_AllAnnotations_Warning_16x16_72.png" Height="16" Width="16"/>
<Label>Caps lock is on</Label>
</StackPanel>
I would prefer a solution with xaml binding only.
We’re using the following approach in our sign in form to show a ‘Caps lock warning’ when the password box has focus.
Not the binding-only answer you’re looking for though.