mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-22 17:58:33 +08:00
35 lines
973 B
C#
35 lines
973 B
C#
using AIStudio.Wpf.DiagramHelper.Controls;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
|
|
namespace AIStudio.Wpf.DiagramHelper.Services
|
|
{
|
|
public class WPFUIVisualizerService : IUIVisualizerService
|
|
{
|
|
|
|
#region Public Methods
|
|
/// <summary>
|
|
/// This method displays a modal dialog associated with the given key.
|
|
/// </summary>
|
|
/// <param name="dataContextForPopup">Object state to associate with the dialog</param>
|
|
/// <returns>True/False if UI is displayed.</returns>
|
|
public bool? ShowDialog(object dataContextForPopup)
|
|
{
|
|
Window win = new PopupWindow();
|
|
win.DataContext = dataContextForPopup;
|
|
win.Owner = Application.Current.MainWindow;
|
|
if (win != null)
|
|
return win.ShowDialog();
|
|
|
|
return false;
|
|
}
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|