更新框架
This commit is contained in:
1 parent
ef50fa0620
commit
84b28f9672
72 files changed
+2222
-282
No files matched your search
@@ -78,6 +78,12 @@ public partial class DialogWindow : WindowBase, IDialogWindow
|
||||
|
||||
protected override void OnContentChanged(object oldContent, object newContent)
|
||||
{
|
||||
// InitializeComponent 设置初始内容时,窗口样式尚未加载。
|
||||
if (!isConstructorSuccessful)
|
||||
{
|
||||
base.OnContentChanged(oldContent, newContent);
|
||||
return;
|
||||
}
|
||||
this.Style = dialogWindowStyle;
|
||||
if (newContent is UserControl control)
|
||||
{
|
||||
@@ -124,9 +130,9 @@ public partial class DialogWindow : WindowBase, IDialogWindow
|
||||
|
||||
protected override void OnStyleChanged(Style oldStyle, Style newStyle)
|
||||
{
|
||||
if (newStyle.TargetType == typeof(Window))
|
||||
if (newStyle?.TargetType == typeof(Window))
|
||||
{
|
||||
if (isConstructorSuccessful)
|
||||
if (isConstructorSuccessful && !ReferenceEquals(dialogWindowStyle, newStyle))
|
||||
{
|
||||
dialogWindowStyle.Merge(newStyle);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user