Ejemplo n.º 1
0
        /// <summary>
        /// Gets the attached <see cref="DW.WPFToolkit.Helpers.EventToCommandCollection" /> behavior.
        /// </summary>
        /// <param name="obj">The element from which the property value is read.</param>
        /// <returns>The DW.WPFToolkit.Helpers.EventToCommandAdapter.EventsToCommands property value for the element.</returns>
        public static EventToCommandCollection GetEventsToCommands(DependencyObject obj)
        {
            var extension = (EventToCommandCollection)obj.GetValue(EventsToCommandsProperty);

            if (extension == null)
            {
                var extensionsCollection = new EventToCommandCollection();
                obj.SetValue(EventsToCommandsProperty, extensionsCollection);
            }
            return(extension);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets the attached <see cref="DW.WPFToolkit.Helpers.EventToCommandCollection" /> behavior.
 /// </summary>
 /// <param name="obj">The element to which the attached property is written.</param>
 /// <param name="value">The needed DW.WPFToolkit.Helpers.EventToCommandAdapter.EventsToCommands value.</param>
 public static void SetEventsToCommands(DependencyObject obj, EventToCommandCollection value)
 {
     obj.SetValue(EventsToCommandsProperty, value);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the attached <see cref="DW.WPFToolkit.Helpers.EventToCommandCollection" /> behavior.
 /// </summary>
 /// <param name="obj">The element to which the attached property is written.</param>
 /// <param name="value">The needed DW.WPFToolkit.Helpers.EventToCommandAdapter.EventsToCommands value.</param>
 public static void SetEventsToCommands(DependencyObject obj, EventToCommandCollection value)
 {
     obj.SetValue(EventsToCommandsProperty, value);
 }
Ejemplo n.º 4
0
 public static void SetMapper(DependencyObject obj, EventToCommandCollection value)
 {
     obj.SetValue(MapperProperty, value);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the attached <see cref="DW.WPFToolkit.Helpers.EventToCommandCollection" /> behavior.
 /// </summary>
 /// <param name="obj">The element from which the property value is read.</param>
 /// <returns>The DW.WPFToolkit.Helpers.EventToCommandAdapter.EventsToCommands property value for the element.</returns>
 public static EventToCommandCollection GetEventsToCommands(DependencyObject obj)
 {
     var extension = (EventToCommandCollection)obj.GetValue(EventsToCommandsProperty);
     if (extension == null)
     {
         var extensionsCollection = new EventToCommandCollection();
         obj.SetValue(EventsToCommandsProperty, extensionsCollection);
     }
     return extension;
 }