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()
{
Focusable = true;
InitializeComponent();
}

View file

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