Example #1
0
            protected override bool CommitCellEdit(sw.FrameworkElement editingElement)
            {
                var control = editingElement as swc.ComboBox ?? editingElement.FindChild <swc.ComboBox> ("control");

                Handler.SetValue(control.DataContext, control.SelectedValue);
                return(true);
            }
Example #2
0
            protected override bool CommitCellEdit(sw.FrameworkElement editingElement)
            {
                var control = editingElement as swc.CheckBox ?? editingElement.FindChild <swc.CheckBox>("control");

                Handler.SetValue(control.DataContext, control.IsChecked);
                Handler.ContainerHandler.CellEdited(Handler, editingElement);
                return(true);
            }
Example #3
0
            protected override object PrepareCellForEdit(sw.FrameworkElement editingElement, sw.RoutedEventArgs editingEventArgs)
            {
                var control = editingElement as swc.TextBox ?? editingElement.FindChild <swc.TextBox>("control");
                var result  = base.PrepareCellForEdit(control, editingEventArgs);

                // AutoSelectMode.OnFocus is the default behaviour of this control
                if (Handler.AutoSelectMode == AutoSelectMode.Always)
                {
                    control.SelectAll();
                }
                else if (Handler.AutoSelectMode == AutoSelectMode.Never)
                {
                    control.SelectionLength = 0;
                    control.SelectionStart  = control.Text.Length;
                }

                return(result);
            }
Example #4
0
            protected override object PrepareCellForEdit(sw.FrameworkElement editingElement, sw.RoutedEventArgs editingEventArgs)
            {
                var control = editingElement as swc.TextBox ?? editingElement.FindChild <swc.TextBox> ("control");

                return(base.PrepareCellForEdit(control, editingEventArgs));
            }