File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,11 @@ public VirtualDesktop GetRight()
110110
111111 private void SetNameToCache ( string name )
112112 {
113+ if ( this . _name == name ) return ;
114+
115+ this . RaisePropertyChanging ( nameof ( this . Name ) ) ;
113116 this . _name = name ;
117+ this . RaisePropertyChanged ( nameof ( this . Name ) ) ;
114118 }
115119
116120#region IDisposable
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . ComponentModel ;
3+ using System . Linq ;
4+ using System . Runtime . CompilerServices ;
5+
6+ namespace WindowsDesktop
7+ {
8+ partial class VirtualDesktop : INotifyPropertyChanging , INotifyPropertyChanged
9+ {
10+ /// <summary>
11+ /// Occurs when a virtual desktop property changing.
12+ /// </summary>
13+ public event PropertyChangingEventHandler PropertyChanging ;
14+
15+ private void RaisePropertyChanging ( [ CallerMemberName ] string propertyName = "" )
16+ => PropertyChanging ? . Invoke ( this , new PropertyChangingEventArgs ( propertyName ) ) ;
17+
18+ /// <summary>
19+ /// Occurs when a virtual desktop property changed.
20+ /// </summary>
21+ public event PropertyChangedEventHandler PropertyChanged ;
22+
23+ private void RaisePropertyChanged ( [ CallerMemberName ] string propertyName = "" )
24+ => PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( propertyName ) ) ;
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments