PackageExplorerViewModel.PackageViewModel.NotifyContentDeleted C# (CSharp) Méthode

NotifyContentDeleted() private méthode

private NotifyContentDeleted ( PackagePart packagePart ) : void
packagePart PackagePart
Résultat void
        internal void NotifyContentDeleted(PackagePart packagePart)
        {
            // if the deleted file is being shown in the content pane, close the content pane
            if (CurrentFileInfo != null && CurrentFileInfo.File == packagePart) {
                CloseContentViewer();
            }

            NotifyChanges();
        }

Usage Example

Exemple #1
0
        public void Delete()
        {
            bool confirm = PackageViewModel.UIServices.Confirm(
                String.Format(CultureInfo.CurrentCulture, Resources.ConfirmToDeleteContent, Name),
                isWarning: true);

            if (!confirm)
            {
                return;
            }

            if (Parent != null)
            {
                Parent.Children.Remove(this);
                PackageViewModel.NotifyContentDeleted(this);
            }
        }
All Usage Examples Of PackageExplorerViewModel.PackageViewModel::NotifyContentDeleted