0
GalaSoft.MvvmLight 어셈블리에 정의 된 IDialogService를 구현하는 데 어려움을 겪고 있습니다. 당신은 정말IDialogService 구현 방법
public Task ShowError(Exception error, string title, string buttonText, Action afterHideCallback)
{
//var result = MessageBox.Show("");
return Dispatcher.Invoke(() => MessageBox.Show("whatever"));
//return Dispatcher.BeginInvoke(delegate() { MessageBox.Show("your stuff"); });
//var dg = new Action(() => { MessageBox.Show("", ""); });
//return Dispatcher.CurrentDispatcher.BeginInvoke(dg);
}
어떻게 WPF에 대한 Messagebox.Show이 비동기 방법을 사용할 수 있습니다 같은 첫 번째 방법을 구현하기 위해 애 쓰고 nuget 패키지 MvvmLightLibs
public interface IDialogService
{
Task ShowError(string message, string title, string buttonText, Action afterHideCallback);
Task ShowError(Exception error, string title, string buttonText, Action afterHideCallback);
Task ShowMessage(string message, string title);
Task ShowMessage(string message, string title, string buttonText, Action afterHideCallback);
Task<bool> ShowMessage(string message, string title, string buttonConfirmText, string buttonCancelText, Action<bool> afterHideCallback);
Task ShowMessageBox(string message, string title);
}
으로부터받을 수 있나요? 도와주세요.
나는 어떤 작품을 보려고하지만, 지금까지는 행운이 없습니다. 누군가 나를 도울 수 있습니까?
사용의
예 ShowError를 비동기 메소드로 구현하고 싶습니까? – Joe
예, 비동기 메서드의 메시지 보 – VivekDev