예제 #1
0
    private void UpdateBehavior(DependencyObject host, IBehavior behavior)
    {
        if (behavior.IsApplicable())
        {
            behavior.Update();
        }
        else
        {
            host.ClearValue(_property);

            behavior.Detach();
        }
    }
예제 #2
0
        private void UpdateBehavior(DependencyObject host, IBehavior behavior, DependencyPropertyChangedEventArgs propertyChangedEventArgs)
        {
            if (behavior.IsApplicable())
            {
                behavior.Update(propertyChangedEventArgs);
            }
            else
            {
                host.ClearValue(_property);

                behavior.Detach();
            }
        }
		private void UpdateBehavior(DependencyObject host, IBehavior behavior)
		{
			if(behavior.IsApplicable())
			{
				behavior.Update();
			}
			else
			{
				host.ClearValue(_property);

				behavior.Detach();
			}
		}