的问题可能是由于以下原因导致的:
<Application x:Class="YourAppName.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<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/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
var controller = await DialogCoordinator.Instance.ShowProgressAsync(this, "标题", "消息");
controller.SetIndeterminate();
总结:
要解决使用DialogCoordinator时,Mahapps中不显示不确定进度条的问题,需要确保正确配置Mahapps的主题、正确使用DialogCoordinator,并且正确引用Mahapps的相关程序集。如果问题仍然存在,可以参考Mahapps的文档或社区寻求帮助。
领取专属 10元无门槛券
手把手带您无忧上云