Reputation: 193432
The blur effect in silverlight 3 is nice:
<StackPanel HorizontalAlignment="Left">
<Button x:Name="Button1"
Content="Click This"
Click="Button1_Click">
<Button.Effect>
<BlurEffect Radius="2"/>
</Button.Effect>
</Button>
</StackPanel>
But how would I do it in code behind:
private void Button1_Click(object sender, RoutedEventArgs e)
{
Button1.Content = "was clicked";
//Button1.Effect.bl...
}
Upvotes: 2
Views: 2508
Reputation: 38428
Silverlight 3 only
private void Button1_Click(object sender, RoutedEventArgs e)
{
((Button)sender).Content = "was clicked";
((Button)sender).Effect = new BlurEffect { Radius = 8 };
}
Upvotes: 1