Example #1
0
        private static void OnSetCommandParameterCallback
            (DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
        {
            GridDataControl control = dependencyObject as GridDataControl;

            if (control != null)
            {
                GridQueryCellStyleInfoBehavior behavior = GetOrCreateBehavior(control);
                behavior.CommandParameter = e.NewValue;
            }
        }
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);
        }