У меня проблема с mahapps, отображается метод ShowProgressAsync, но не показывает загрузочные гранулы внизу. Я думаю, что проблема заключается в том, что рендеринг остается синхронным.mahapps ShowProgressAsync не показывает загрузчик асинхронный - WPF (C#)
Может ли кто-нибудь дать мне решение? Я изо всех сил пытаюсь найти проблему.
Xaml:
<controls:MetroWindow x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication1"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Button Content="Clicca" Width="150" Click="Button_Click" Height="50"></Button>
</Grid>
</controls:MetroWindow>
Codebehind:
using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfApplication1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : MetroWindow
{
ProgressDialogController x;
public MainWindow()
{
InitializeComponent();
}
private async void Button_Click(object sender, RoutedEventArgs e)
{
x = await this.ShowProgressAsync("test","loading", false) as ProgressDialogController;
}
}
}
Они должны выйти в нижней части кадра, которые текут, но остаются заблокированными
У меня такая же проблема. Неопределенный бар не отображается даже при вызове x.SetIndeterminate(); – Beachwalker