AppStore.MainPage.InstallButton_Click C# (CSharp) Method

InstallButton_Click() private method

Executed when the Install button is tapped from the Context Menu, which appears when the app is long tapped.
private InstallButton_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.
return void
        private void InstallButton_Click(object sender, RoutedEventArgs e)
        {
            var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
            if ((bool)localSettings.Values[appHolding.Name]) return;
            localSettings.Values[appHolding.Name] = true;
            AppList.getMyAppList().myappList.Add(appHolding);
            btnMyApps.Visibility = Visibility.Visible;
            var toastTemplate = ToastTemplateType.ToastImageAndText01;
            var toastXml = ToastNotificationManager.GetTemplateContent(toastTemplate);
            var toastTextElements = toastXml.GetElementsByTagName("text");
            toastTextElements[0].AppendChild(toastXml.CreateTextNode(appHolding.Name + " is installed."));
            var toast = new ToastNotification(toastXml);
            ToastNotificationManager.CreateToastNotifier().Show(toast);
        }