- tweak: Search think
This commit is contained in:
@@ -12,34 +12,43 @@
|
||||
<Design.DataContext>
|
||||
<viewModels:AccountInfoViewModel />
|
||||
</Design.DataContext>
|
||||
<Grid ColumnDefinitions="*,1.5*" RowDefinitions="*">
|
||||
<Grid ColumnDefinitions="*,1.5*" RowDefinitions="*" Margin="15">
|
||||
<StackPanel Grid.Column="0" Grid.Row="0">
|
||||
<Border
|
||||
CornerRadius="10"
|
||||
Margin="5"
|
||||
Padding="15">
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<StackPanel HorizontalAlignment="Center" Spacing="15">
|
||||
<Image
|
||||
Height="100"
|
||||
Margin="0,0,0,20"
|
||||
Source="/Assets/account.png" />
|
||||
<Grid ColumnDefinitions="120, 100" RowDefinitions="Auto, Auto, Auto">
|
||||
<Label Grid.Column="0" Grid.Row="0">Login:</Label>
|
||||
<Grid ColumnDefinitions="100, 100" RowDefinitions="Auto, Auto, Auto, Auto" VerticalAlignment="Center">
|
||||
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center">Login:</Label>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding CurrentLogin}"/>
|
||||
<Label Grid.Column="0" Grid.Row="1">Password:</Label>
|
||||
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center">Password:</Label>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
PasswordChar="#"
|
||||
Text="{Binding CurrentPassword}" />
|
||||
<Label Grid.Column="0" Grid.Row="2">Auth server:</Label>
|
||||
<Label Grid.Column="0" Grid.Row="2" VerticalAlignment="Center">Auth server:</Label>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="{Binding CurrentAuthServer}"/>
|
||||
<ScrollViewer Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Height="80">
|
||||
<ListBox Margin="15" Background="#00000000" ItemsSource="{Binding AuthUrls}" SelectedItem="{Binding AuthItemSelect}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label><TextBlock Text="{Binding}"/></Label>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
<TextBox
|
||||
Margin="0"
|
||||
VerticalAlignment="Center"
|
||||
Watermark="Server name..." />
|
||||
Watermark="Server name..." Text="{Binding SearchText}" TextChanged="TextBox_OnTextChanged"/>
|
||||
<Button Grid.Column="1" Padding="10">
|
||||
<Image Source="/Assets/filter.png" />
|
||||
</Button>
|
||||
|
||||
@@ -17,4 +17,10 @@ public partial class ServerListView : UserControl
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
|
||||
private void TextBox_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||
{
|
||||
var context = (ServerListViewModel?)DataContext;
|
||||
context?.OnSearchChange?.Invoke();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user