Short Syntax Binding Issue

Topics: Actions & Coroutines
Jun 8, 2011 at 2:07 AM

I have a UserControl on which I have declared a custom event:

     public event EventHandler<MapClickedEventArgs> MapClickedEvent;

public class MapClickedEventArgs : RoutedEventArgs

In my model I have a handler defined:


     public void HandleMapClicked(MapClickedEventArgs e)

When I tried to bind the handler to the UserControl in the view using the short syntax:


cal:Message.Attach="[Event MapClickedEvent] = [Action HandleMapClicked($eventArgs)]"

the handler was never called. However using the long syntax:

        <i:EventTrigger EventName="MapClickedEvent">
          <cal:ActionMessage MethodName="HandleMapClicked">
            <cal:Parameter Value="$eventArgs" />


works just fine. Anybody got any ideas why the short syntax would not work when the long syntax did?



Jun 8, 2011 at 5:33 PM

That's very strange. Can you create a simple solution that reproduces the issue, create a ticket for me and attach it? That should work...