Search code examples
silverlightmouseleftbuttonup

Silverlight event MouseLeftButtonDown not fired


I ran into the problem where in Silverlight event MouseLeftButtonDown is not being fired for Button and hyperlinkButton. Looks like it is handled somewhere in the framework. How I can override this behavior

In the XAML code below When I click on the button Named Cancel, Button_MouseLeftButtonDown is not fired. I tried putting textblock within the button , MouseLeftButtonDown works when I click on the text on the button, but it is not bubbled up to the Frame

    <Button Name="Cancel" ClickMode="Release" MouseLeftButtonDown="Button_MouseLeftButtonDown">
            <Button.Content>
                <TextBlock Name="CancelInnerText" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown">Clone Page</TextBlock>
            </Button.Content>


Solution

  • Got it to work, had to set the ClickMode="Hover" for the button. Now MouseLeftButtonDown event is firing and also bubbling