Linked In Twitter RSS

MouseLeftButtonDown event in StackPanel and Grid don’t fire every time

15. March 2009  · Comments (0)

Recently I have been playing with silverlight and I came into a situation where MouseLeftButtonDown event is not triggered every time.It is only triggered when I click on child control inside container.

One way to fix this is to set background color of container to something.In my example I set my background color of grid control to transparent.

<Grid Height="100" Width="Auto" MouseLeftButtonDown="Grid_MouseLeftButtonDown" Background="Transparent">

Now if you click anywhere inside grid control MouseLeftButtonDown event is triggered.

Pingbacks and trackbacks (1)+

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading