Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoSuggestBox refactoring #524

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7917d2f
Added NewAutoSuggestBox
IvanDmitriev1 Feb 2, 2023
542f22f
Added new properties
IvanDmitriev1 Feb 2, 2023
aad74a4
Implemented selection object from suggest list
IvanDmitriev1 Feb 3, 2023
2fe9d92
Added events
IvanDmitriev1 Feb 3, 2023
9705c6f
Implemented UpdateTextOnSelect
IvanDmitriev1 Feb 3, 2023
203ae86
Closing SuggestionsList after selecting an item with the left mouse b…
IvanDmitriev1 Feb 3, 2023
0569ce7
Clean up
IvanDmitriev1 Feb 3, 2023
7d57da5
Addde control to the gallery
IvanDmitriev1 Feb 3, 2023
616c9af
Clean up
IvanDmitriev1 Feb 3, 2023
6b3063a
Implemented AutoSuggestionBoxTextChangeReason.ProgrammaticChange
IvanDmitriev1 Feb 3, 2023
134fd21
AutoSuggestBoxPage update
IvanDmitriev1 Feb 3, 2023
ef92d12
The popup closes when the focus is lost
IvanDmitriev1 Feb 4, 2023
f1e8310
Started using DisplayMemberPath
IvanDmitriev1 Feb 4, 2023
31e10e5
Implemented default filtering
IvanDmitriev1 Feb 4, 2023
1ad3b8e
Added SuggestionsPopupClosed event
IvanDmitriev1 Feb 4, 2023
73c517b
AutoSuggestBoxPage cleanup
IvanDmitriev1 Feb 4, 2023
eeb5316
Deleted original AutoSuggestBox
IvanDmitriev1 Feb 4, 2023
63ac000
Renamed style
IvanDmitriev1 Feb 4, 2023
9e4be77
Implemented closing AutoSuggestBox with escape key
IvanDmitriev1 Feb 4, 2023
6cce8d6
Deleted SuggestionsPopupClosed event
IvanDmitriev1 Feb 4, 2023
a2a6f70
Update AutoSuggestBox.cs
IvanDmitriev1 Feb 4, 2023
5f6b37d
Fixed bug
IvanDmitriev1 Feb 5, 2023
49bb5bf
Changed namespace
IvanDmitriev1 Feb 5, 2023
b311314
Update VisualStudioToolsManifest.xml
IvanDmitriev1 Feb 5, 2023
bb95879
Added keyboard shortcut for AutoSuggestBox
IvanDmitriev1 Feb 6, 2023
1c0bb63
Merge branch 'development' into AutoSuggestBox-refactoring
IvanDmitriev1 Feb 8, 2023
3f17f96
Update NavigationView.Base.cs
IvanDmitriev1 Feb 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/Wpf.Ui.Gallery/Views/Pages/Text/AutoSuggestBoxPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Wpf.Ui.Gallery.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Wpf.Ui.Gallery.Views.Pages.Text"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
xmlns:text="clr-namespace:Wpf.Ui.Gallery.ViewModels.Pages.Text"
xmlns:text1="clr-namespace:Wpf.Ui.Gallery.Views.Pages.Text"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Title="AutoSuggestBoxPage"
d:DataContext="{d:DesignInstance local:AutoSuggestBoxPage,
d:DataContext="{d:DesignInstance text1:AutoSuggestBoxPage,
IsDesignTimeCreatable=False}"
d:DesignHeight="450"
d:DesignWidth="800"
Expand All @@ -27,6 +28,7 @@
x:Name="PageScrollViewer"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
Expand All @@ -38,17 +40,20 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<controls:GalleryControlPresenter
Grid.Row="0"
Margin="0"
CodeText="&lt;ui:AutoSuggestBox PlaceholderText=&quot;Search...&quot; /&gt;"
HeaderText="WPF UI AutoSuggestBox.">
<controls:GalleryControlPresenter.Content>
<ui:AutoSuggestBox ItemsSource="{Binding ViewModel.AutoSuggestBoxSuggestions, Mode=OneWay}" PlaceholderText="Search..." />
<ui:AutoSuggestBox OriginalItemsSource="{Binding ViewModel.AutoSuggestBoxSuggestions, Mode=OneWay}" PlaceholderText="Search..." />
</controls:GalleryControlPresenter.Content>
</controls:GalleryControlPresenter>
</Grid>
</Grid>


</ui:DynamicScrollViewer>
<controls:ControlDocumentationSummary CsharpUrl="{StaticResource PageCsharpUrl}" XamlUrl="{StaticResource PageXamlUrl}" />
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.


using Wpf.Ui.Controls.Navigation;
using Wpf.Ui.Gallery.ViewModels.Pages.Text;

Expand Down
11 changes: 9 additions & 2 deletions src/Wpf.Ui.Gallery/Views/Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
WindowCornerPreference="Default"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">

<ui:FluentWindow.InputBindings>
<KeyBinding
Key="F"
Command="{Binding ElementName=AutoSuggestBox, Path=FocusCommand}"
Modifiers="Control" />
</ui:FluentWindow.InputBindings>

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand All @@ -40,9 +48,8 @@
</ui:NavigationView.Header>
<ui:NavigationView.AutoSuggestBox>
<ui:AutoSuggestBox
x:Name="AutoSuggestBox"
Margin="8,8,8,16"
IconPlacement="Right"
PlaceholderEnabled="True"
PlaceholderText="Search" />
</ui:NavigationView.AutoSuggestBox>
<ui:NavigationView.ContentOverlay>
Expand Down
Loading