I am trying to search a TextBox with a built-in magnifying glass icon. So far I have the following markup:
<Border DockPanel.Dock="Bottom" Margin="2,4,0,4" BorderThickness="1" SnapsToDevicePixels="True" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right"> <Image Source="/Resources/search-13x13.png" Width="13"/> </StackPanel> <TextBox Name="searchTextBox" DockPanel.Dock="Bottom" BorderThickness="0" Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}"/> </DockPanel> </Border>
However, I cannot find an entry in SystemColors that will give me the same color as the standard TextBox border. By default, it is blue. Am I really stupid here?!?
EDIT: btw, the image is contained in the stack panel because I also plan to place the down arrow.
Grokys
source share