mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-26 21:17:20 -08:00
code_review: PR #644
- use `AutoFocusBehaviour.IsEnable` instead of toggle focus by code in `OnOpened ` Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
794163fe1c
commit
58fbb16347
2 changed files with 3 additions and 9 deletions
|
@ -39,15 +39,15 @@
|
||||||
<TextBlock Text="{Binding Description}" TextWrapping="Wrap"/>
|
<TextBlock Text="{Binding Description}" TextWrapping="Wrap"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<TextBox Name="PassphraseTextBox"
|
<TextBox Margin="16"
|
||||||
Margin="16"
|
|
||||||
MinWidth="300"
|
MinWidth="300"
|
||||||
Height="32"
|
Height="32"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
Text="{Binding Passphrase, Mode=TwoWay}"
|
Text="{Binding Passphrase, Mode=TwoWay}"
|
||||||
PasswordChar="*"
|
PasswordChar="*"
|
||||||
RevealPassword="{Binding ShowPassword, Mode=OneWay}"
|
RevealPassword="{Binding ShowPassword, Mode=OneWay}"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch"
|
||||||
|
v:AutoFocusBehaviour.IsEnabled="True">
|
||||||
<TextBox.InnerRightContent>
|
<TextBox.InnerRightContent>
|
||||||
<ToggleButton Grid.Column="6"
|
<ToggleButton Grid.Column="6"
|
||||||
Classes="toggle_untracked"
|
Classes="toggle_untracked"
|
||||||
|
|
|
@ -52,11 +52,5 @@ namespace SourceGit.Views
|
||||||
Console.Out.Write($"{Passphrase}\n");
|
Console.Out.Write($"{Passphrase}\n");
|
||||||
App.Quit(0);
|
App.Quit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnOpened(EventArgs e)
|
|
||||||
{
|
|
||||||
PassphraseTextBox.Focus();
|
|
||||||
base.OnOpened(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue