Created
April 17, 2014 08:17
-
-
Save dkalamari/10963821 to your computer and use it in GitHub Desktop.
WPF TextBox focus through MVVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Style x:Key="NormalTextBox" TargetType="{x:Type TextBox}"> | |
<Style.Triggers> | |
<DataTrigger Binding="{Binding IsFocused}" Value="True"> | |
<Setter Property="FocusManager.FocusedElement" | |
Value="{Binding RelativeSource={RelativeSource Self}}" /> | |
</DataTrigger> | |
</Style.Triggers> | |
</Style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good