Ejemplo n.º 1
0
 private static void OnSetCommandParameterCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
 {
     System.Windows.Controls.ListView element = dependencyObject as System.Windows.Controls.ListView;
     if (element != null)
     {
         EnterReleaseBehavior behavior = GetOrCreateBehavior(element);
         behavior.CommandParameter = e.NewValue;
     }
 }
Ejemplo n.º 2
0
        private static EnterReleaseBehavior GetOrCreateBehavior(System.Windows.Controls.ListView element)
        {
            EnterReleaseBehavior behavior = element.GetValue(EnterReleaseBehaviorProperty) as EnterReleaseBehavior;

            if (behavior == null)
            {
                behavior = new EnterReleaseBehavior(element);
                element.SetValue(EnterReleaseBehaviorProperty, behavior);
            }
            return(behavior);
        }
Ejemplo n.º 3
0
 public static void SetEnterReleaseBehavior(DependencyObject obj, EnterReleaseBehavior value)
 {
     obj.SetValue(EnterReleaseBehaviorProperty, value);
 }