views:

1031

answers:

1

If you use this code in Silverlight and WPF you get slightly different results?

    <Button Name="SomeButton" Margin="10,15,180,12" Width="200" Height="50"
            VerticalAlignment="Top" Background="Black" Foreground="White">
   </Button>

In Silverlight you do not get a solid black Button. You get a vertical white-to-black gradient. How do you force this to be a solid color?

As a follow up, is their a similar method to counteract the annoying way Vista "decorates" buttons with the lightblue hover effect.

Thanks.

+1  A: 

This is because the default template of the button between WPF and Silverlight is different; in Blend, go to "Template->Edit a Copy" to edit the button template and blow away the gradient.

Paul Betts
I can't get <Button> to work in Blend. It says its invalid tag. What am I doing wrong?
tyndall
Is something repeated wrong with my Blend installs? All I ever see for controls is line, ellipse, rectangle.
tyndall
I figured out all my issues with Blend 2.0 where solved by installing the SP1 for Blend 2.0
tyndall