/// <summary>Renames a child of this folder.</summary> /// <param name="relativeChildPidl">The relative child IDL.</param> /// <param name="newName">The new name.</param> /// <param name="displayType">The display type.</param> /// <param name="parentWindow">The parent window to use if any messages need to be shown the user.</param> /// <returns>A reference to the newly named item.</returns> public ShellItem RenameChild(PIDL relativeChildPidl, string newName, ShellItemDisplayString displayType, HWND parentWindow) { iShellFolder.SetNameOf(parentWindow, relativeChildPidl, newName, (SHGDNF)displayType, out PIDL newPidl); return(this[newPidl]); }
/// <summary>Renames a child of this folder.</summary> /// <param name="relativeChildPidl">The relative child IDL.</param> /// <param name="newName">The new name.</param> /// <param name="displayType">The display type.</param> /// <param name="parentWindow">The parent window to use if any messages need to be shown the user.</param> /// <returns>A reference to the newly named item.</returns> public ShellItem RenameChild(PIDL relativeChildPidl, string newName, ShellItemDisplayString displayType, System.Windows.Forms.IWin32Window parentWindow) { iShellFolder.SetNameOf(IWin2Ptr(parentWindow), relativeChildPidl, newName, (SHGDNF)displayType, out PIDL newPidl); return(this[newPidl]); }
/// <summary>Gets a formatted display name for this item.</summary> /// <param name="option">The formatting options.</param> /// <returns>A string with the formatted display name if successful; otherwise <c>null</c>.</returns> public string GetDisplayName(ShellItemDisplayString option) => GetDisplayName((SIGDN)option);