src/Misc/EFTools/DesignXmlCore/Base/Shell/TreeGridDesignerBranch.cs
/// <summary>
///     Called to initiate an in-place edit
/// </summary>
/// <param name="row">Index into this branch</param>
/// <param name="column">Column index</param>
/// <param name="alternateText">
///     Text to display when editing commences.  By default, creator nodes
///     display the empty string when initially edited
/// </param>
/// <param name="maxTextLength">Maximum length of the text to be edited</param>
/// <param name="customInPlaceEdit"></param>
/// <returns></returns>
Called to initiate an in-place edit
Called to initiate an in - place edit
[SuppressMessage("Microsoft.Design", "CA1045:DoNotPassTypesByReference")]
        [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate")]
        protected virtual bool BeginLabelEdit(
            int row, int column, ref string alternateText, ref int maxTextLength, ref object customInPlaceEdit)
        {
            AbortVirtualTreeEdit = false;
            var supportedState = GetValueSupported(row, column);
            if ((supportedState & TreeGridDesignerValueSupportedStates.SupportsInPlaceEdit) != 0)
            {
                customInPlaceEdit = typeof(TreeGridDesignerInPlaceEdit);
                if (row >= ElementCount)
                {
                    var component = GetCreatorElement();
                    if (component != null)
                    {
                        customInPlaceEdit = _columns[column].GetInPlaceEdit(component, ref alternateText);
                        return customInPlaceEdit != null;
                    }
                    alternateText = String.Empty;
                }
                else if (row != _insertingIndex)
                {
                    var component = GetElement(row);
                    customInPlaceEdit = _columns[column].GetInPlaceEdit(component, ref alternateText);
                    return customInPlaceEdit != null;
                }
                return true;
            }
            return false;
        }
[ SuppressMessage ( " " , " " ) ] [ SuppressMessage ( " " , " " ) ] protected virtual bool BeginLabelEdit ( int row , int column , ref string alternateText , ref int maxTextLength , ref object customInPlaceEdit ) { AbortVirtualTreeEdit = false ; var supportedState = GetValueSupported ( row , column ) ; if ( ( supportedState & TreeGridDesignerValueSupportedStates . SupportsInPlaceEdit ) != 0 ) { customInPlaceEdit = typeof ( TreeGridDesignerInPlaceEdit ) ; if ( row >= ElementCount ) { var component = GetCreatorElement ( ) ; if ( component != null ) { customInPlaceEdit = _columns [ column ] . GetInPlaceEdit ( component , ref alternateText ) ; return customInPlaceEdit != null ; } alternateText = String . Empty ; } else if ( row != _insertingIndex ) { var component = GetElement ( row ) ; customInPlaceEdit = _columns [ column ] . GetInPlaceEdit ( component , ref alternateText ) ; return customInPlaceEdit != null ; } return true ; } return false ; }
Called to initiate an in-place edit
Called to initiate an in - place edit
// We currently also allow branches to return null here to indicate that // they do not support editing.  Perhaps we should change this and require // a value for customInPlaceEdit
None
row
int
Index into this branch
Index into this branch
column
int
None
string
ref
int
ref
object
ref
alternateText
Text to display when editing commences.  By default, creator nodes
display the empty string when initially edited
Text to display when editing commences . By default creator nodes display the empty string when initially edited
maxTextLength
Maximum length of the text to be edited
Maximum length of the text to be edited
customInPlaceEdit
None