I want to overlay a image on grid. the code like this:
<Grid>
<UniformGrid>
<control:ImageButton Width="150" Height="150" Image="/MyStyle;component/Resources/Button1.png" Tag="Playlists" Click="Button_Click" />
<control:ImageButton Width="150" Height="150" Image="/MyStyle;component/Resources/Button2.png" Tag="Now Playing" Click="Button_Click" />
<control:ImageButton Width="150" Height="150" Image="/MyStyle;component/Resources/Button3.png" Tag="Artists" Click="Button_Click" />
<control:ImageButton Width="150" Height="150" Image="/MyStyle;component/Resources/Button4.png" Tag="Genius Mixes" Click="Button_Click" />
</UniformGrid>
<Border>
<Border.Background>
<ImageBrush ImageSource="/MyStyle;component/Resources/reflect.png" />
</Border.Background>
</Border>
the question is, the button cannot get any messages, how can solve this problem?
any idea? than开发者_C百科ks.You need to set IsHitTestVisible
to false
on your overlay element:
<Border IsHitTestVisible="False">
<Border.Background>
<ImageBrush ImageSource="/MyStyle;component/Resources/reflect.png" />
</Border.Background>
</Border>
精彩评论