Xaml 使用Caliburn Micro时,如何在系统托盘中使用数据绑定?

Xaml 使用Caliburn Micro时,如何在系统托盘中使用数据绑定?,xaml,data-binding,windows-phone-8,caliburn.micro,Xaml,Data Binding,Windows Phone 8,Caliburn.micro,我正在将一个基于MVVM的WP8应用程序转换为Caliburn Micro,这是我的新产品(对XAML/WP8来说也是绿色的) 如何将SystemTray之类的东西绑定到视图的ViewModel上让我感到困惑。在Caliburn Micro之前,我的观点是 <UserControl.Resources> <viewModels:SomeViewModel x:Key="viewModel" /> </UserControl.Resources> &l

我正在将一个基于MVVM的WP8应用程序转换为Caliburn Micro,这是我的新产品(对XAML/WP8来说也是绿色的)

如何将SystemTray之类的东西绑定到视图的ViewModel上让我感到困惑。在Caliburn Micro之前,我的观点是

<UserControl.Resources>
    <viewModels:SomeViewModel x:Key="viewModel" />
</UserControl.Resources>

<shell:SystemTray.ProgressIndicator>
    <shell:ProgressIndicator IsVisible="{Binding Path=IsLoading, Source={StaticResource viewModel}}" />
</shell:SystemTray.ProgressIndicator>

这工作得非常好,在加载ViewModel时会显示加载指示器。既然我的ViewModel不再是视图中的静态资源,那么如何将绑定放到SystemTray中呢

我最初的尝试失败了:

<shell:ProgressIndicator IsVisible="{Binding ElementName=LayoutRoot, Path=DataContext.IsLoading" />


我觉得我需要将viewmodel从
LayoutRoot
中拉出,但我不确定该怎么做。

这篇博文有一种不同的方法,看起来它会起作用:如果有人想回答,我仍然很好奇如何用CM解决上述问题。