ux: set Focusable by XAML instead of hard coded

This commit is contained in:
leo 2024-09-12 17:05:05 +08:00
parent ea3a6a4755
commit 8a20a7a542
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View file

@ -96,7 +96,6 @@ namespace SourceGit.Views
public ChangeCollectionView() public ChangeCollectionView()
{ {
Focusable = true;
InitializeComponent(); InitializeComponent();
} }

View file

@ -65,6 +65,7 @@
<!-- Unstaged Changes --> <!-- Unstaged Changes -->
<v:ChangeCollectionView Grid.Row="1" <v:ChangeCollectionView Grid.Row="1"
x:Name="UnstagedChangesView" x:Name="UnstagedChangesView"
Focusable="True"
IsUnstagedChange="True" IsUnstagedChange="True"
SelectionMode="Multiple" SelectionMode="Multiple"
Background="{DynamicResource Brush.Contents}" Background="{DynamicResource Brush.Contents}"
@ -100,6 +101,7 @@
<!-- Staged Changes --> <!-- Staged Changes -->
<v:ChangeCollectionView Grid.Row="3" <v:ChangeCollectionView Grid.Row="3"
x:Name="StagedChangesView" x:Name="StagedChangesView"
Focusable="True"
SelectionMode="Multiple" SelectionMode="Multiple"
Background="{DynamicResource Brush.Contents}" Background="{DynamicResource Brush.Contents}"
ViewMode="{Binding Source={x:Static vm:Preference.Instance}, Path=StagedChangeViewMode}" ViewMode="{Binding Source={x:Static vm:Preference.Instance}, Path=StagedChangeViewMode}"