private async void SetFileAssocButton_Click(object sender, RoutedEventArgs e) { if (!(this.DataContext is SettingsManager context)) { return; } FileAssociations.SetRoflToSelf(); var msgDialog = new GenericMessageDialog() { Title = TryFindResource("FileAssociationMessageTitleText") as String, Owner = this }; msgDialog.SetMessage(TryFindResource("FileAssociationMessageBodyText") as String); // Show dialog await msgDialog.ShowAsync(ContentDialogPlacement.Popup).ConfigureAwait(true); }