Silverlight Image Button - Image FAR too faded (transparent? Overlayed?)
I've figured out how to add images to my buttons in my Silverlight 4 app, and while the image show up on the button, you can barely see it. It's as if the image opacity is set extremely low. I've tried setting the opacity to 100, but it has no effect.
What's the dealio?
Here's my code for le button:
<Button Height="70" HorizontalAlignment="Left" Margin="16,14,0,0" Name="btnNew" VerticalAlignment="Top" Width="85" Click="button1_Click">
<Button.Background>
<ImageBrush Image开发者_开发百科Source="/images/NewFile-Mono.png"></ImageBrush>
</Button.Background>
</Button>
The Image opacity is not the issue here, its the default style template that has a container with some opacity or gradient effect that overlays over the top of the container that hosts your image brush...You would mostly likely have to edit the default template for the Button to get this to work... It's probably much easier to just set the Button.Content
as an Image
<Button Height="70" HorizontalAlignment="Left" Margin="16,14,0,0" Name="btnNew" VerticalAlignment="Top" Width="85" Click="button1_Click">
<Image Source="/images/NewFile-Mono.png"/>
</Button>
精彩评论