예제 #1
0
        /// <summary>
        /// Creates a new sub-directory with a default name in this directory.
        /// </summary>
        /// <param name="editing">Indicates whether the new sub-directory should be put in edit mode immediately when constructed.</param>
        /// <returns>A new instance of <see cref="DirectoryViewModel"/> representing the new sub-directory.</returns>
        public DirectoryViewModel CreateSubDirectory(bool editing)
        {
            var newDirectory = new DirectoryViewModel(NamingHelper.ComputeNewName(NewFolderDefaultName, SubDirectories.Cast <DirectoryBaseViewModel>(), x => x.Name), this, true)
            {
                IsEditing = editing
            };

            return(newDirectory);
        }