WinRT Action Messages with AppBar

Topics: Actions & Coroutines
Sep 17, 2012 at 8:37 PM

Another WinRT question ...

Has anybody tried using action messages for events on the AppBar? I've seen in the sample app, and with my own trials, that action messages in general seem to work. But the following scenario is not working for me and it seems like it should:

<Page.BottomAppBar>
  <AppBar cal:Message.Attach="[Event Closed] = [Action DeselectItem]">
    <!-- Content of appbar -->
  </AppBar>
</Page.BottomAppBar>

I have a public void DeselectItem method on my view model but it does not get called when the appbar is closed. The Closed event does work - I tested with the normal code-behind event wiring. But it's not triggering the method on my viewmodel. I suspect this is a bug, but thought I would check to see if I'm missing something obvious.

Thanks,
Kevin 

Oct 6, 2012 at 8:21 PM

May you create an issue including a sample project, please.

Oct 9, 2012 at 2:31 AM

No problem, I have created the issue with a sample project here: http://caliburnmicro.codeplex.com/workitem/250.

Thanks!

Kevin

Oct 9, 2012 at 8:14 PM

I did some simple test and for me it seems to be an issue in Windows.UI.Interactivity.
As it did also not work if I removed the caliburn.micro magic.

see https://github.com/jlaanstra/Windows.UI.Interactivity/issues/10

Oct 10, 2012 at 1:06 AM

Ah, okay. Hopefully they'll be able to fix it in the Windows.UI.Interactivity project.