Answer the question
In order to leave comments, you need to log in
How to handle button clicks on notification in wpf in windows c#?
I added Microsoft.Toolkit.Uwp.Notifications to my WPF project and made a notification and added a button to it so that when it is clicked, some action happens, but I just don’t know where and how to make a handler so that some kind of action happens. Searched everywhere and found nothing. Came to address to experts living here.
private void Button_click(object sender, RoutedEventArgs e)
{
new ToastContentBuilder()
.AddText("Уведомление")
.AddText("Уведомление")
.AddButton(new ToastButton()
.SetContent("Перейти к уведомлению")
.SetBackgroundActivation())
.Show();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question