I have an image that I am using as a button but on the mouse enter I want the opacity to be 100%, which at this point is only 80%. How would I do that?
here is my mouse enter event
private void playButton_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
{
double x;
}
I am using blend, silverlight 4 thanks
assuming your event is being "hit"...
private void playButton_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
{
if ( sender is Button )
((Button)sender).Opacity = 1;
}
that said, you should also respond to the mouse out event and set the opacity back to .8
you could use the visual state manager to do this as well. here is a nice example on MSDN