mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-13 04:59:26 +08:00
阀门优化
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Reactive.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
@@ -130,6 +131,18 @@ namespace Util.DiagramDesigner
|
||||
{
|
||||
PropertyChanged?.Invoke(this, args);
|
||||
}
|
||||
|
||||
public IObservable<string> WhenPropertyChanged
|
||||
{
|
||||
get
|
||||
{
|
||||
return Observable
|
||||
.FromEventPattern<PropertyChangedEventHandler, PropertyChangedEventArgs>(
|
||||
h => this.PropertyChanged += h,
|
||||
h => this.PropertyChanged -= h)
|
||||
.Select(x => x.EventArgs.PropertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ValuePropertyChangedEventArgs : PropertyChangedEventArgs
|
||||
|
||||
Reference in New Issue
Block a user