Open a word document from a toast notification

Eduardo Gomez 3,416 Reputation points
2022-10-03T15:35:43.553+00:00

I am using Azure, and saving a .docx on my computer, then when I am finished, I send a toast notification, to let the user know, the document is ready.

I currently have this, but I wished to add a button, that will open a word document

   public static void CreateAndShowPrompt() {  
            new ToastContentBuilder()  
             .AddArgument("action", "viewConversation")  
             .AddArgument("conversationId", 9813)  
             .AddAppLogoOverride(new Uri("file:///" + Path.GetFullPath(@"Images\Word.png"), UriKind.Absolute), ToastGenericAppLogoCrop.Circle)  
             .AddText(Lang.ToastMsg1)  
             .AddText(Lang.ToastMsg2)  
             .Show(); //  
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,705 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,567 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hui Liu-MSFT 47,176 Reputation points Microsoft Vendor
    2022-10-04T03:02:39.157+00:00

    Hi,@Eduardo Gomez .
    I found the project to add Button to Toast Notifications on github. You could try to refer to it.
    The result of my test:
    118614-3.gif

    ----------------------------------------------------------------------------

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.