Esempio n. 1
0
 private void Attach()
 {
     this.Detach();
     if (this.target != null && this.binding != null)
     {
         this.listener = this.GetListener();
         this.listener.Attach(this.target, this.binding);
     }
 }
Esempio n. 2
0
 private BindingListener.DependencyPropertyListener GetListener()
 {
     BindingListener.DependencyPropertyListener dependencyPropertyListener;
     if (BindingListener.freeListeners.Count != 0)
     {
         dependencyPropertyListener = BindingListener.freeListeners[BindingListener.freeListeners.Count - 1];
         BindingListener.freeListeners.RemoveAt(BindingListener.freeListeners.Count - 1);
         return(dependencyPropertyListener);
     }
     dependencyPropertyListener          = new BindingListener.DependencyPropertyListener();
     dependencyPropertyListener.Changed += new EventHandler <BindingChangedEventArgs>(this.HandleValueChanged);
     return(dependencyPropertyListener);
 }
Esempio n. 3
0
		private void Attach()
		{
			this.Detach();
			if (this.target != null && this.binding != null)
			{
				this.listener = this.GetListener();
				this.listener.Attach(this.target, this.binding);
			}
		}
Esempio n. 4
0
		private void ReturnListener()
		{
			this.listener.Changed -= new EventHandler<BindingChangedEventArgs>(this.HandleValueChanged);
			BindingListener.freeListeners.Add(this.listener);
			this.listener = null;
		}
Esempio n. 5
0
		private BindingListener.DependencyPropertyListener GetListener()
		{
			BindingListener.DependencyPropertyListener dependencyPropertyListener;
			if (BindingListener.freeListeners.Count != 0)
			{
				dependencyPropertyListener = BindingListener.freeListeners[BindingListener.freeListeners.Count - 1];
				BindingListener.freeListeners.RemoveAt(BindingListener.freeListeners.Count - 1);
				return dependencyPropertyListener;
			}
			dependencyPropertyListener = new BindingListener.DependencyPropertyListener();
			dependencyPropertyListener.Changed += new EventHandler<BindingChangedEventArgs>(this.HandleValueChanged);
			return dependencyPropertyListener;
		}
Esempio n. 6
0
 private void ReturnListener()
 {
     this.listener.Changed -= new EventHandler <BindingChangedEventArgs>(this.HandleValueChanged);
     BindingListener.freeListeners.Add(this.listener);
     this.listener = null;
 }