I am trying to call the UI manager dialog:
class DialogService : IDialogService
{
private readonly Dispatcher _dispatcher = Application.Current.Dispatcher;
public bool? Show(IDialogViewModel viewModel)
{
if (_dispatcher.CheckAccess())
{
var dialogWindow = new DialogWindow();
return dialogWindow.Show(viewModel);
}
else
{
Func<IDialogViewModel, bool?> func = Show;
return (bool?)_dispatcher.Invoke(func, viewModel);
}
}
}
However, the call is Invokeblocked forever, and is Shownever called in the user interface thread ...
Using is BeginInvokenot an option: I need the result immediately because I am handling the event from a remote object (using remote .NET)
Any idea?
UPDATE
Here is a more complete description of the problem:
, Windows .NET Remoting. - ( , ). : CredentialsNeeded, . . , .
, , ... , , Invoke , ? , ? WinForms , Application.Run, , WPF...