public void AddNewFolder()
{
IsExplorerExpanded = true;
var name = GetUniqueName();
string resourcePath = String.IsNullOrEmpty(ResourcePath) ? name : string.Format("{0}\\{1}", ResourcePath, name);
ExplorerItemModel explorerItemModel = new ExplorerItemModel(_connectControlSingleton, _studioResourceRepository)
{
DisplayName = name,
ResourceType = ResourceType.Folder,
Parent = this,
EnvironmentId = EnvironmentId,
Permissions = Permissions,
ResourcePath = resourcePath
};
_studioResourceRepository.AddItem(explorerItemModel);
var firstOrDefault = Children.FirstOrDefault(c => c.DisplayName == name);
if(firstOrDefault != null)
{
firstOrDefault.IsRenaming = true;
}
}