0

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.

4

1 に答える 1

1

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.

于 2009-02-12T04:10:56.193 に答える