diff --git a/FoxTube.Core/FoxTube.Core.csproj b/FoxTube.Core/FoxTube.Core.csproj
index 29fbcb8..379eda5 100644
--- a/FoxTube.Core/FoxTube.Core.csproj
+++ b/FoxTube.Core/FoxTube.Core.csproj
@@ -142,6 +142,7 @@
+
diff --git a/FoxTube.Core/Models/SearchSuggestion.cs b/FoxTube.Core/Models/SearchSuggestion.cs
new file mode 100644
index 0000000..555dcab
--- /dev/null
+++ b/FoxTube.Core/Models/SearchSuggestion.cs
@@ -0,0 +1,15 @@
+namespace FoxTube.Core.Models
+{
+ public class SearchSuggestion
+ {
+ public string Icon { get; set; }
+ public string Text { get; set; }
+
+ public SearchSuggestion(string text) : this(text, false) { }
+ public SearchSuggestion(string text, bool isHistoryEntry)
+ {
+ Text = text;
+ Icon = isHistoryEntry ? "\xE81C" : "";
+ }
+ }
+}
diff --git a/FoxTube/MainPage.xaml b/FoxTube/MainPage.xaml
index 20e7350..e022ca0 100644
--- a/FoxTube/MainPage.xaml
+++ b/FoxTube/MainPage.xaml
@@ -7,7 +7,8 @@
mc:Ignorable="d"
xmlns:ui="using:Microsoft.UI.Xaml.Controls"
xmlns:controls="using:FoxTube.Controls"
- xmlns:toolkit="using:Microsoft.Toolkit.Uwp.UI.Controls">
+ xmlns:toolkit="using:Microsoft.Toolkit.Uwp.UI.Controls"
+ xmlns:models="using:FoxTube.Core.Models">
@@ -32,7 +33,21 @@
PaneOpening="NavigationView_PaneOpening">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FoxTube/MainPage.xaml.cs b/FoxTube/MainPage.xaml.cs
index c199e5b..e597046 100644
--- a/FoxTube/MainPage.xaml.cs
+++ b/FoxTube/MainPage.xaml.cs
@@ -2,6 +2,7 @@
using FoxTube.Core.Models;
using FoxTube.Views;
using System;
+using System.Collections.Generic;
using Windows.ApplicationModel.Core;
using Windows.Foundation.Metadata;
using Windows.UI;
@@ -131,5 +132,28 @@ namespace FoxTube
else
(content.Content as IRefreshable)?.RefreshPage();
}
+
+ void AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
+ {
+ if (sender.Text.Length < 3 || args.Reason != AutoSuggestionBoxTextChangeReason.UserInput)
+ return;
+
+ sender.ItemsSource = new List
+ {
+ new SearchSuggestion("Suggestion 0"),
+ new SearchSuggestion("Suggestion 1"),
+ new SearchSuggestion("Suggestion 2"),
+ new SearchSuggestion("Suggestion 3"),
+ new SearchSuggestion("Suggestion 4"),
+ new SearchSuggestion("History entry 0", true),
+ new SearchSuggestion("History entry 1", true),
+ new SearchSuggestion("History entry 2", true)
+ };
+ }
+
+ void AutoSuggestBox_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args)
+ {
+
+ }
}
}