Reputation: 554
i use a rectangle lying over other controls to darken them. now, i still want to be able to interact with the controls behind the rectangle, this rectangle will never have another sense than his visual aspect. the problem is, that it catches all clicks & so on, so it's ATM a obstacle.
xaml
<Rectangle Canvas.ZIndex="1" Opacity="0" Name="shadow" Fill="Black"/>
c#
shadow.Opacity = Math.Round(1-(double)(App.Current as App).dimfactor / 255,2);
(App.Current as App).dimfactor is a value between 150 & 255.
how to deal with that?
thanks
Upvotes: 1
Views: 273
Reputation: 2965
I'm not entirely sure if it's the same in WP7 as silverlight but can't you set the IsHitTestVisible bool to false?
<Rectangle Canvas.ZIndex="1" IsHitTestVisible="false" Opacity="0" Name="shadow" Fill="Black"/>
Upvotes: 3