mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-25 03:12:21 +08:00
enhance: text search in ComboBox
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
Height="28" Padding="8,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding RemoteBranches}"
|
||||
IsTextSearchEnabled="True"
|
||||
SelectedItem="{Binding SelectedTrackingBranch, Mode=TwoWay}"
|
||||
IsVisible="{Binding SetTrackingBranch, Mode=OneWay}">
|
||||
<ComboBox.ItemTemplate>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Platform.Storage;
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Pull.Branch}"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
x:Name="RemoteBranchesComboBox"
|
||||
Height="28" Padding="8,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding RemoteBranches}"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Data;
|
||||
|
||||
namespace SourceGit.Views
|
||||
{
|
||||
@@ -7,6 +9,7 @@ namespace SourceGit.Views
|
||||
public Pull()
|
||||
{
|
||||
InitializeComponent();
|
||||
TextSearch.SetTextBinding(RemoteBranchesComboBox, new Binding("Name"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Push.Local}"/>
|
||||
<ComboBox Grid.Row="0" Grid.Column="1"
|
||||
x:Name="LocalBranchesComboBox"
|
||||
Height="28" Padding="8,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding LocalBranches}"
|
||||
@@ -58,6 +59,7 @@
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Push.To}"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1"
|
||||
x:Name="RemoteBranchesComboBox"
|
||||
Height="28" Padding="8,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding RemoteBranches}"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Data;
|
||||
|
||||
namespace SourceGit.Views
|
||||
{
|
||||
@@ -7,6 +9,8 @@ namespace SourceGit.Views
|
||||
public Push()
|
||||
{
|
||||
InitializeComponent();
|
||||
TextSearch.SetTextBinding(LocalBranchesComboBox, new Binding("Name"));
|
||||
TextSearch.SetTextBinding(RemoteBranchesComboBox, new Binding("Name"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.SetUpstream.Upstream}"/>
|
||||
<ComboBox Grid.Row="1" Grid.Column="1"
|
||||
x:Name="RemoteBranchesComboBox"
|
||||
Height="28" Padding="8,0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"
|
||||
ItemsSource="{Binding RemoteBranches}"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Data;
|
||||
|
||||
namespace SourceGit.Views
|
||||
{
|
||||
@@ -7,6 +9,7 @@ namespace SourceGit.Views
|
||||
public SetUpstream()
|
||||
{
|
||||
InitializeComponent();
|
||||
TextSearch.SetTextBinding(RemoteBranchesComboBox, new Binding("Name"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user