|
6 | 6 | xmlns:ui="clr-namespace:Dynamo.UI;assembly=DynamoCoreWpf" |
7 | 7 | xmlns:local="clr-namespace:Dynamo.PackageManager.UI;assembly=DynamoCoreWpf" |
8 | 8 | xmlns:dynconverters="clr-namespace:Dynamo.Controls;assembly=DynamoCoreWpf" |
| 9 | + xmlns:resxother="clr-namespace:Dynamo.Wpf.Properties;assembly=DynamoCoreWpf" |
9 | 10 | mc:Ignorable="d" |
10 | 11 | WindowStyle="None" |
11 | 12 | AllowsTransparency="True" |
|
40 | 41 | </Style> |
41 | 42 | <dynconverters:BoolToVisibilityConverter x:Key="BooleanToVisibilityConverter"/> |
42 | 43 | <dynconverters:InverseBoolToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter"/> |
| 44 | + <dynconverters:LengthToVisibilityConverter x:Key="LengthToVisibilityConverter"/> |
43 | 45 | </ResourceDictionary> |
44 | 46 | </Window.Resources> |
45 | 47 |
|
|
160 | 162 | </Style> |
161 | 163 | </ComboBox.Style> |
162 | 164 | <ComboBox.Tag> |
163 | | - <TextBox x:Name="AutoCompleteSearchBox" |
164 | | - HorizontalAlignment="Stretch" |
165 | | - Height="24" |
166 | | - Margin="16,5,16,5" |
167 | | - Padding="2" |
168 | | - Width="Auto" |
169 | | - Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ComboBox}}" |
170 | | - Background="{Binding Background, RelativeSource={RelativeSource AncestorType=ComboBox}}" |
171 | | - FontFamily="{Binding FontFamily, RelativeSource={RelativeSource AncestorType=ComboBox}}" |
172 | | - CaretBrush="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ComboBox}}" |
173 | | - FontSize="14"> |
174 | | - <TextBox.Text> |
175 | | - <Binding Path="SearchInput" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" /> |
176 | | - </TextBox.Text> |
177 | | - </TextBox> |
| 165 | + <Grid> |
| 166 | + <TextBox x:Name="AutoCompleteSearchBox" |
| 167 | + HorizontalAlignment="Stretch" |
| 168 | + Height="28" |
| 169 | + Margin="7,3,7,3" |
| 170 | + Padding="2" |
| 171 | + Width="Auto" |
| 172 | + BorderThickness="0,0,0,1" |
| 173 | + Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ComboBox}}" |
| 174 | + Background="{Binding Background, RelativeSource={RelativeSource AncestorType=ComboBox}}" |
| 175 | + FontFamily="{Binding FontFamily, RelativeSource={RelativeSource AncestorType=ComboBox}}" |
| 176 | + CaretBrush="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ComboBox}}" |
| 177 | + FontSize="14"> |
| 178 | + <TextBox.Text> |
| 179 | + <Binding Path="SearchInput" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" /> |
| 180 | + </TextBox.Text> |
| 181 | + </TextBox> |
| 182 | + |
| 183 | + <StackPanel x:Name="PlaceholderPanel" |
| 184 | + Orientation="Horizontal" |
| 185 | + VerticalAlignment="Center" |
| 186 | + IsHitTestVisible="False" |
| 187 | + HorizontalAlignment="Stretch" |
| 188 | + Height="28" |
| 189 | + Margin="12,3,7,3" |
| 190 | + Width="Auto" |
| 191 | + Visibility="{Binding Text.Length, ElementName=AutoCompleteSearchBox, Converter={StaticResource LengthToVisibilityConverter}}"> |
| 192 | + <Image x:Name="SearchIcon" |
| 193 | + Width="20px" |
| 194 | + Height="20px" |
| 195 | + HorizontalAlignment="Left" |
| 196 | + VerticalAlignment="Center" |
| 197 | + DockPanel.Dock="Left"> |
| 198 | + <Image.Style> |
| 199 | + <Style TargetType="{x:Type Image}"> |
| 200 | + <Setter Property="Source" Value="/DynamoCoreWpf;component/UI/Images/searchmagnifier.png" /> |
| 201 | + </Style> |
| 202 | + </Image.Style> |
| 203 | + </Image> |
| 204 | + <TextBlock Padding="2" FontSize="14" Text="{x:Static resxother:Resources.LibraryViewSearchText}" Foreground="{Binding Foreground, RelativeSource={RelativeSource AncestorType=ComboBox}}" VerticalAlignment="Center"/> |
| 205 | + </StackPanel> |
| 206 | + </Grid> |
178 | 207 | </ComboBox.Tag> |
179 | 208 | <ComboBox.ItemTemplate> |
180 | 209 | <DataTemplate> |
|
0 commit comments