This commit is contained in:
RMBGAME
2021-11-26 21:52:51 +08:00
parent 7032193e52
commit b3201064ca
2 changed files with 20 additions and 2 deletions
@@ -130,6 +130,24 @@ namespace System.Application.UI.Views
title.Background = x ? null : _backgroundTemp;
});
}
if (nav != null)
{
this.GetObservable(BoundsProperty)
.Subscribe(x =>
{
switch (x.Width)
{
case < 950:
nav.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftCompact;
nav.IsPaneOpen = false;
break;
default:
nav.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
break;
}
});
}
}
private void InitializeComponent()
+2 -2
View File
@@ -27,8 +27,8 @@ namespace System.Application.Settings
/// <summary>
/// 不再提示的消息框数组
/// </summary>
public static SerializableProperty<List<MessageBox.DontPromptType>> DoNotShowMessageBoxs { get; }
= GetProperty(defaultValue: new List<MessageBox.DontPromptType>(), autoSave: false);
public static SerializableProperty<HashSet<MessageBox.DontPromptType>> DoNotShowMessageBoxs { get; }
= GetProperty(defaultValue: new HashSet<MessageBox.DontPromptType>(), autoSave: false);
}
}