packages/Windows API Code Pack 1.1/source/WindowsAPICodePack/Core/Dialogs/Common/DialogControlCollection.cs
/// <summary>
/// Removes the control at the specified index.
/// </summary>
/// <param name="index">The location of the control to remove.</param>
/// <permission cref="System.InvalidOperationException">
/// The associated dialog is 
/// showing and cannot be modified.</permission>
Removes the control at the specified index.
Removes the control at the specified index .
protected override void RemoveItem(int index)
        {
            if (!hostingDialog.IsCollectionChangeAllowed())
            {
                throw new InvalidOperationException(LocalizedMessages.DialogCollectionModifyShowingDialog);
            }
            DialogControl control = (DialogControl)Items[index];
            control.HostingDialog = null;
            base.RemoveItem(index);
            hostingDialog.ApplyCollectionChanged();
        }
protected override void RemoveItem ( int index ) { if ( ! hostingDialog . IsCollectionChangeAllowed ( ) ) { throw new InvalidOperationException ( LocalizedMessages . DialogCollectionModifyShowingDialog ) ; } DialogControl control = ( DialogControl ) Items [ index ] ; control . HostingDialog = null ; base . RemoveItem ( index ) ; hostingDialog . ApplyCollectionChanged ( ) ; }
Removes the control at the specified index.
Removes the control at the specified index .
// Notify that we're about to remove a control. // Throw if dialog showing. // Unparent and remove.
index
int
The location of the control to remove.
The location of the control to remove .
permission
The associated dialog is
showing and cannot be modified.
The associated dialog is showing and cannot be modified .