Beispiel #1
0
 /// <summary>
 ///     Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing">
 ///     <c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only
 ///     unmanaged resources.
 /// </param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_Behavior != null)
         {
             _Behavior.Dispose();
             _Behavior = null;
         }
     }
 }
Beispiel #2
0
 /// <summary>
 ///     Sets the Behavior property.
 /// </summary>
 private static void SetBehavior(DependencyObject d, CommandBehaviorBinding value)
 {
     d.SetValue(BehaviorProperty, value);
 }
Beispiel #3
0
        /// <summary>
        ///     Handles changes to the CommandParameter property.
        /// </summary>
        private static void OnCommandParameterChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CommandBehaviorBinding binding = GetOrCreateBinding(d);

            binding.CommandParameter = e.NewValue;
        }