mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-27 19:53:24 +08:00
popup支持设置大小
This commit is contained in:
@@ -22,6 +22,20 @@ namespace AIStudio.Wpf.DiagramDesigner.Services
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool? ShowDialog(object dataContextForPopup, double width, double height)
|
||||
{
|
||||
PopupWindow win = new PopupWindow();
|
||||
win.SizeToContent = SizeToContent.Manual;
|
||||
win.Width = width;
|
||||
win.Height = height;
|
||||
win.DataContext = dataContextForPopup;
|
||||
win.Owner = Application.Current.MainWindow;
|
||||
if (win != null)
|
||||
return win.ShowDialog();
|
||||
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user