SearchBar.xaml
1 <?xml version="1.0" encoding="utf-8" ?> 2 <UserControl 3 x:Class="Microsoft.CmdPal.UI.Controls.SearchBar" 4 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 5 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 6 xmlns:cmdpalUi="using:Microsoft.CmdPal.UI" 7 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 8 xmlns:h="using:Microsoft.CmdPal.UI.Helpers" 9 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 10 mc:Ignorable="d"> 11 12 <UserControl.Resources> 13 <ResourceDictionary> 14 <cmdpalUi:PlaceholderTextConverter x:Key="PlaceholderTextConverter" /> 15 </ResourceDictionary> 16 </UserControl.Resources> 17 18 <!-- Search box --> 19 <TextBox 20 x:Name="FilterBox" 21 MinHeight="32" 22 VerticalAlignment="Stretch" 23 VerticalContentAlignment="Stretch" 24 h:TextBoxCaretColor.SyncWithForeground="True" 25 AutomationProperties.AutomationId="MainSearchBox" 26 KeyDown="FilterBox_KeyDown" 27 PlaceholderText="{x:Bind CurrentPageViewModel.PlaceholderText, Converter={StaticResource PlaceholderTextConverter}, Mode=OneWay}" 28 PreviewKeyDown="FilterBox_PreviewKeyDown" 29 PreviewKeyUp="FilterBox_PreviewKeyUp" 30 Style="{StaticResource SearchTextBoxStyle}" 31 TextChanged="FilterBox_TextChanged" /> 32 <!-- Disabled Description="{x:Bind CurrentPageViewModel.TextToSuggest, Mode=OneWay}" for now, needs more work --> 33 </UserControl>