R
R
rp_Faraon2022-03-19 20:10:09
Notifications
rp_Faraon, 2022-03-19 20:10:09

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(); 

        }

To check the sending of notifications, I created a button and by pressing I call the notification itself.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2022-03-21
@rp_Faraon

https://docs.microsoft.com/en-us/windows/apps/desi...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question