I met the same issue with UserControl in Silverlight 5.
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) { base.OnMouseLeftButtonDown(e); Background = new SolidColorBrush(Colors.Black);
But if I name the main grid of the grid and write the following code:
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) { base.OnMouseLeftButtonDown(e); grid.Background = new SolidColorBrush(Colors.Black);
It works, I donβt know why. When I need to use some complex opacity effects, I may need additional Rectangles and install Fill. This is a bit uncomfortable.
source share