The Silverlight button directly sets its background to a color that often does not reach the effect. Because its built-in template puts the button background into a gradient brush. So if you want a solid color background, modify its template.
The code to modify the template in the background is as follows:
StringBuilder sb = new StringBuilder ();
Sb. Append ("<controltemplate xmlns= ' http://schemas.microsoft.com/winfx/2006/xaml/presentation ' xmlns:x= '/http Schemas.microsoft.com/winfx/2006/xaml ' ");
Sb. Append ("Xmlns:data= ' clr-namespace:system.windows.controls;assembly=system.windows.controls.data ' xmlns:mc= ' http ://schemas.openxmlformats.org/markup-compatibility/2006 ' ");
Sb. Append ("targettype= ' button ' >");
Sb. Append ("<border x:name=\" Border\ "background=\" {TemplateBinding background}\ "><contentpresenter Verticalalignment=\ "Center\" horizontalalignment=\ "left\"/></border> ");
Sb. Append ("</ControlTemplate>");
ControlTemplate ct = xamlreader.load (sb.) ToString ()) as ControlTemplate;
Btn. Template = ct;
Btn. Foreground = new SolidColorBrush (colors.white);
Btn. Background = new SolidColorBrush (Color.FromArgb (0xFF, 0x49, 0xa9, 0x8d));
Silverlight background Setting button solid color background