I found two different approaches worked, based on the answer that Paul gave. I ended up using the second. In the first approach I added a public method to my MyViewModel:
public void ClickOnTile(PaperTileViewModel pt)
{
code to run;
}
Then, in my View I added the following:
public void ForkItUp(object sender, ItemClickEventArgs args)
{
var obj = DataContext as MyViewModel;
obj.ClickOnTile(args.ClickedItem as PaperTileViewModel);
}
And the XAML for my view for the grid view:
<GridView x:Name="PaperList" Margin="0" Grid.Column="1" IsItemClickEnabled="True" ItemClick="ForkItUp"/>
I'm a C++ guy by training, so the lack of type safety got to me a bit and lead to this second solution (which is the one that I ended up committing). So I ended up doing the following in the end. I first created an interface in my ViewModel's PCL:
public interface IHomePageViewCallback
{
void FinalizeVMWiring(HomePageViewModel homePageViewModel);
}
Then, in the View I implemented the interface:
public sealed partial class MyPageView : Page, IHomePageViewCallback
{
public MyPageView()
{
this.InitializeComponent();
}
public void FinalizeVMWiring(MyViewModel myVM)
{
PaperList.ItemClick += (s, args) => myVM.NavigateToPaperTile.Execute((args.ClickedItem) as PaperTileViewModel);
}
}
where NavigateToPaperTile is a ReactiveCommand similar to what Paul has in his answer. This funny call back is needed because as far as I can tell there is no easy way to get a typed version of the ViewModel in Caliburn.Micro.
For completeness here is the XAML:
<GridView x:Name="PaperList" Margin="0" Grid.Column="1" IsItemClickEnabled="True"/>