Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attach to multiple events with Caliburn.Micro

I am working on a Windows Phone 8 project with Caliburn.Micro and I want to attach to 2 separate events on the same button.

What is the syntax for doing this?

I have tried a few combinations of the below but keep getting an error from Caliburn saying "Hop pair not part of existing route"

cm:Message.Attach="[Event Tap] = [Action SelectItem], [Event Hold] = [Action OpenItemMenu]"

So far I have been able to get it working with 1 event using the short syntax and one using the long but would prefer to be able to use them both the same way.

like image 302
dkarzon Avatar asked Dec 26 '13 05:12

dkarzon


1 Answers

The delimiter for specifying multiple actions is a semicolon ;

<Button Content="Let's Talk" cal:Message.Attach="[Event MouseEnter] = [Action Talk('Hello', Name.Text)]; [Event  MouseLeave] = [Action Talk('Goodbye', Name.Text)]" />
like image 157
Nigel Sampson Avatar answered Sep 23 '22 00:09

Nigel Sampson