Skip to content

Commit

Permalink
SelectAllOnFocus for input and login dialg #1750
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Jul 27, 2015
1 parent 91a465e commit 75604f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions MahApps.Metro/Themes/Dialogs/InputDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Margin="0 5 0 0"
FontSize="{DynamicResource DialogMessageFontSize}"
controls:ControlsHelper.FocusBorderBrush="{DynamicResource AccentColorBrush}"
controls:TextBoxHelper.SelectAllOnFocus="True"
x:Name="PART_TextBox"
Text="{Binding Input, RelativeSource={RelativeSource AncestorType=Dialogs:InputDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap"
Expand Down
2 changes: 2 additions & 0 deletions MahApps.Metro/Themes/Dialogs/LoginDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
FontSize="{DynamicResource DialogMessageFontSize}"
x:Name="PART_TextBox"
Controls:TextBoxHelper.Watermark="{Binding UsernameWatermark, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
Controls:TextBoxHelper.SelectAllOnFocus="True"
Text="{Binding Username, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap"
Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
Expand All @@ -32,6 +33,7 @@
x:Name="PART_TextBox2"
Behaviors:PasswordBoxBindingBehavior.Password="{Binding Password, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
Controls:TextBoxHelper.Watermark="{Binding PasswordWatermark, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}"
Controls:TextBoxHelper.SelectAllOnFocus="True"
Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=Dialogs:LoginDialog, Mode=FindAncestor}, UpdateSourceTrigger=PropertyChanged}" />
<StackPanel Grid.Row="3"
Orientation="Horizontal"
Expand Down

0 comments on commit 75604f5

Please sign in to comment.