views:

929

answers:

1

It seems that the WPF Rectangle shape does not have the Click event defined. What am I supposed to use instead?

It does have MouseUp, but it's not quite the same behavior.

+5  A: 

If you're not happy with MouseDown and MouseUp, perhaps you could just put the Rectangle in a Button and handle the Button's Click event?

<Button>
    <Button.Template>
        <ControlTemplate>
            <Rectangle .../>
        </ControlTemplate>
    </Button.Template>
</Button>

It really depends with the behavior you're after. Please elaborate if needs be.

HTH, Kent

Kent Boogaart
This is probably what I want.
emddudley