繁体   English   中英

使用 MahApps 显示 MetroDialog 时允许拖动

[英]Allow dragging when MetroDialog is shown using MahApps

我正在使用 MahApps 创建我的 WPF 应用程序。 我刚刚发现,只要显示 MetroDialog,MainWindow(MetroWindow 类)就不能拖动。 有没有办法改变这个? 我从 ViewModel 调用对话框,如下所示:

var _dialog = new CustomDialog() { Title = "MyDialog" };
\\Content for the dialog..
await _dialogCoordinator.ShowMetroDialogAsync(this, _dialog);

我已经将 MainWindow 设置为IsWindowDraggable= "true" 如果需要更多信息,请告诉我。

谢谢!

对话框 windows 在关闭之前始终是块父级。 如果要拖动父级,则需要使用常规子级 window,而不是对话框之一

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM