Example #1
0
        private static GridItemsSourceChangedBehavior GetOrCreateBehavior(GridDataControl control)
        {
            GridItemsSourceChangedBehavior behavior =
                control.GetValue(GridItemsSourceChangedBehaviorProperty) as GridItemsSourceChangedBehavior;

            if (behavior == null)
            {
                behavior = new GridItemsSourceChangedBehavior(control);
                control.SetValue(GridItemsSourceChangedBehaviorProperty, behavior);
            }
            return(behavior);
        }
Example #2
0
        private static GridQueryCellStyleInfoBehavior GetOrCreateBehavior(GridDataControl control)
        {
            GridQueryCellStyleInfoBehavior behavior =
                control.GetValue(GridQueryCellStyleInfoBehaviorProperty) as GridQueryCellStyleInfoBehavior;

            if (behavior == null)
            {
                behavior = new GridQueryCellStyleInfoBehavior(control);
                control.SetValue(GridQueryCellStyleInfoBehaviorProperty, behavior);
            }
            return(behavior);
        }
Example #3
0
 public static void SetCommandParameter(GridDataControl control, object parameter)
 {
     control.SetValue(CommandParameterProperty, parameter);
 }
Example #4
0
 public static void SetCommand(GridDataControl control, ICommand command)
 {
     control.SetValue(CommandProperty, command);
 }