Toast NotificationsExtensions 的按钮未出现

Button for Toast NotificationsExtensions not appearing

这是我第一次实现 Toast 通知,但按钮有问题:

我正在使用 NotificationsExtensions 创建 Toast 通知:

ToastContent tc = new ToastContent()
        {
            Visual = new ToastVisual()
            {
                TitleText = new ToastText() { Text = "Quick Save" },
                BodyTextLine1 = new ToastText() { Text = "Type below the info that you wanna save and press enter" }
            },
            Actions = new ToastActionsCustom()
            {
                Inputs =
                {
                    new ToastTextBox(nameBox)
                    {
                        PlaceholderContent = "type here"
                    }
                },

                Buttons =
                {
                    new ToastButton("save", "save")
                    {
                        TextBoxId = nameBox
                    }
                }
            },
                Duration = ToastDuration.Short
            };

您忘记为您的按钮添加 ImageUri

ToastContent tc = new ToastContent()
{
    Visual = new ToastVisual()
    {
        TitleText = new ToastText()
        {
            Text = "Quick Save"
        },
        BodyTextLine1 = new ToastText()
        {
            Text = "Type below the info that you wanna save and press enter"
        }
    },

    Actions = new ToastActionsCustom()
    {
        Inputs =
        {
            new ToastTextBox("nameBox")
            {
                PlaceholderContent = "type here"
            }
        },

        Buttons =
        {
            new ToastButton("save", "save")
            {
                TextBoxId = "nameBox",
                ImageUri = "Assets/check.png"
            }
        }
    }
};

var text = tc.GetContent();
var xml = tc.GetXml();
var toast = new ToastNotification(xml);
ToastNotificationManager.CreateToastNotifier().Show(toast);