When you create a custom control, all the default properties of its base class, Control, gets assigned to it. You can use TemplateBinding to bind the data to a specific control. For example, to change the background color of the input box based on the Background property set on the control level, you need to create the template binding in the following way:
<TextBox x:Name="PART_TextBox" Grid.Column="0" Margin="2" Background="{TemplateBinding Background}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
Now, when you change the color of the control, it will change the color of the said input box. Set a color to the Background property of our search control inside the MainWindow.xaml and observe the change.