当我尝试从ViewModel调用mahapps进度对话框时:
public async void Test()
{
var controller =
await
this.dialogCoordinator.ShowProgressAsync(
this,
"Progress from VM",
"Progressing all the things, wait 3 seconds");
controller.SetIndeterminate();
// await Task.Delay(3000);
// await controller.CloseAsync();
}
显示对话框,但滚动的不确定进度不会显示在对话框的底部。使用Snoop监视XAML显示控件在那里,但条形图不显示滚动球。任何想法?
答案 0 :(得分:0)
我能够解决这个问题。我在添加样式时错过了一行:
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Baselight.xaml" />
<!-- missed the inclusion of accent color style, have own style for anything else so I didn't noticed that -->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Clean/Clean.xaml"/>