AppStore.MyAppsPage.UninstallButton_Click C# (CSharp) Метод

UninstallButton_Click() приватный Метод

Executed when the Uninstall Button is tapped from the Context menu which appears when the app is long tapped. It uninstalls the installed app.
private UninstallButton_Click ( object sender, RoutedEventArgs e ) : void
sender object Object Sender is a parameter called Sender that contains a reference to the control/object that raised the event.
e RoutedEventArgs RoutedEventArgs e is a parameter called e that contains the event data, see the RoutedEventArgs MSDN page for more information.
Результат void
        private async void UninstallButton_Click(object sender, RoutedEventArgs e)
        {
            MessageDialog msg = new MessageDialog("Do you want to uninstall the " + appHolding.Name + " ?", "Uninstall");
            msg.Commands.Add(new UICommand("Yes"));
            msg.Commands.Add(new UICommand("No"));
            msg.DefaultCommandIndex = 1;
            msg.CancelCommandIndex = 0;
            var result = await msg.ShowAsync();
            if (result.Label.Equals("Yes"))
            {
                var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
                localSettings.Values[appHolding.Name] = false;
                AppList.getMyAppList().myappList.Remove(appHolding);
                if (AppList.getMyAppList().myappList.Count == 0) Frame.GoBack();
                GridMyApps.ItemsSource=(new List<Apps>());
                GridMyApps.ItemsSource = AppList.getMyAppList().myappList;
            }
        }