feature: auto-focus when open a new page (#368)

This commit is contained in:
leo 2024-08-19 17:24:39 +08:00
parent 3369cc00f3
commit 8bd8787d25
No known key found for this signature in database

View file

@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:c="using:SourceGit.Converters" xmlns:c="using:SourceGit.Converters"
xmlns:vm="using:SourceGit.ViewModels" xmlns:vm="using:SourceGit.ViewModels"
xmlns:v="using:SourceGit.Views"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SourceGit.Views.Welcome" x:Class="SourceGit.Views.Welcome"
x:DataType="vm:Welcome"> x:DataType="vm:Welcome">
@ -19,7 +20,8 @@
Background="{DynamicResource Brush.Contents}" Background="{DynamicResource Brush.Contents}"
Watermark="{DynamicResource Text.Welcome.Search}" Watermark="{DynamicResource Text.Welcome.Search}"
VerticalContentAlignment="Center" VerticalContentAlignment="Center"
Text="{Binding SearchFilter, Mode=TwoWay}"> Text="{Binding SearchFilter, Mode=TwoWay}"
v:AutoFocusBehaviour.IsEnabled="True">
<TextBox.InnerLeftContent> <TextBox.InnerLeftContent>
<Path Width="16" Height="16" Margin="6,0,3,0" Data="{StaticResource Icons.Search}" Fill="{DynamicResource Brush.FG2}"/> <Path Width="16" Height="16" Margin="6,0,3,0" Data="{StaticResource Icons.Search}" Fill="{DynamicResource Brush.FG2}"/>
</TextBox.InnerLeftContent> </TextBox.InnerLeftContent>