예제 #1
0
        private void ResetEventBinding()
        {
            if (Owner != null)
            {
                if (Behavior.Event != null && Behavior.Owner != null)
                {
                    Behavior.Dispose();
                }

                Behavior.BindEvent(Owner, Event);
            }
        }
예제 #2
0
 private void ResetEventBinding()
 {
     if (Owner != null) //only do this when the Owner is set
     {
         //check if the Event is set. If yes we need to rebind the Command to the new event and unregister the old one
         if (Behavior.Event != null && Behavior.Owner != null)
         {
             Behavior.Dispose();
         }
         //bind the new event to the command
         Behavior.BindEvent(Owner, Event);
     }
 }