Skip to content

Commit 0c64c3e

Browse files
committed
fix: Make the password prompt title in taskbar and UI title consistent. fix #847
1 parent 14eef1a commit 0c64c3e

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

Ui/View/Editor/IconPopupDialogView.xaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:styles="clr-namespace:Shawn.Utils.WpfResources.Theme.Styles;assembly=Shawn.Utils.WpfResources"
77
xmlns:editor="clr-namespace:_1RM.View.Editor"
8-
xmlns:model="clr-namespace:_1RM.Service.DataSource.Model"
9-
xmlns:dao="clr-namespace:_1RM.Service.DataSource.DAO"
10-
xmlns:attachProperty="clr-namespace:Shawn.Utils.WpfResources.Theme.AttachProperty;assembly=Shawn.Utils.WpfResources"
11-
xmlns:controls="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel"
128
xmlns:icons="clr-namespace:_1RM.Resources.Icons"
139
xmlns:s="https://github.com/canton7/Stylet"
1410
mc:Ignorable="d"
@@ -17,6 +13,7 @@
1713
SizeToContent="WidthAndHeight"
1814
Background="Transparent"
1915
AllowsTransparency="True"
16+
Title="Select Icon"
2017
d:DataContext="{d:DesignInstance editor:IconPopupDialogViewModel}">
2118
<Window.Resources>
2219
<Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockBase}">

Ui/View/Editor/PasswordPopupDialogView.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
xmlns:attachProperty="clr-namespace:Shawn.Utils.WpfResources.Theme.AttachProperty;assembly=Shawn.Utils.WpfResources"
88
xmlns:editor="clr-namespace:_1RM.View.Editor"
99
xmlns:controls="clr-namespace:_1RM.Controls"
10-
ShowInTaskbar="False"
10+
ShowInTaskbar="True"
1111
ResizeMode="NoResize"
1212
WindowStyle="None"
1313
SizeToContent="Height"

Ui/View/Editor/PasswordPopupDialogViewModel.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@ public class PasswordPopupDialogViewModel : NotifyPropertyChangedBaseScreen
1919
{
2020
public bool DialogResult { get; set; } = false;
2121

22-
public string Title { get; set; } = "";
22+
private string _title = "";
23+
public string Title
24+
{
25+
get => _title;
26+
set
27+
{
28+
if (SetAndNotify(ref _title, value))
29+
{
30+
if (View is PasswordPopupDialogView v)
31+
{
32+
v.Title = value;
33+
}
34+
}
35+
}
36+
}
2337

2438
private string _userName = "";
2539
public string UserName
@@ -91,6 +105,8 @@ protected override void OnViewLoaded()
91105
base.OnViewLoaded();
92106
if (View is PasswordPopupDialogView v)
93107
{
108+
v.Title = Title;
109+
94110
v.TbUserName.Text = UserName;
95111
v.TbPwd.Password = Password;
96112

0 commit comments

Comments
 (0)