I have following grid:
<Grid x:Name="grd" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Height="100" >
<Button x:Name="but" OverridesDefaultStyle="True" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" >
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Border Name="Bd" Style="{StaticResource MatrixStyle}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="50" Height="50" />
</ControlTemplate>
</Button.Template>
</Button>
<Border BorderBrush="Black" BorderThickness="1" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="50" Height="50" HorizontalAlignment="Right" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
<Border BorderBrush="Black" BorderThickness="1" Width="50" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
</Grid>
This parent grid has MouseDown event attached to it. If I keep the 4 Borders and remove the buttons this event gets fired.But If I keep only the button and remove the other borders this event does not get fired. what may be the probable cause of this problem?