I have made a textbox in XAML, which goes like this:
<TextBox x:Name="search"
TextWrapping="Wrap"
VerticalAlignment="Top"
Margin="-12,-13,45,0"
Background="#FFB2B2B8"
BorderBrush="Transparent"
Foreground="White"
inputScope="Search"
SelectionForeground="#FF72BCE6" />
and whenever I tap on the textbox to write something, its background changes. How can I set the background so that it is always on the same color?
Make use of the focus event handler.
Edit: Explaining further,
attach an onfocus event handler to the textbox
in the method, set the background colour of the textbox to the colour you desire.
Expanded even further, in case you want to find out more on what i mean, check this out
http://www.limguohong.com/2012/09/windows-phone-7-textbox-on-focus-color/