示例#1
0
        public static MyBinding <T> CreateBindingSP <U, T>(SourceProvider <U, T> SrcProvider, string Key, Action <T> Fire, Action Fail, bool AddToGlobalList = true)
            where T : class, INotifyPropertyChanged
            where U : class, INotifyPropertyChanged
        {
            var b = new MyBinding <T>(Key, Fire, Fail);

            SrcProvider.Add(b);
            if (AddToGlobalList)
            {
                AllBindings.Add(b);
            }
            return(b);
        }
示例#2
0
        public static MyBinding <T> CreateBinding <T>(T Source, string Key, Action <T> Fire, Action Fail, bool AddToGlobalList = true)
            where T : class, INotifyPropertyChanged
        {
            var b = new MyBinding <T>(Key, Fire, Fail);

            b.Source = Source;

            if (AddToGlobalList)
            {
                AllBindings.Add(b);
            }

            return(b);
        }
示例#3
0
 public void Add(MyBinding <U> b)
 {
     Children.Add(b);
     OnFire(Source, new MyBinding <U>[] { b });
 }