无法向 windows phone 8.1 中的组添加祝酒词

Unable to add toasts to the group in windows phone 8.1

ToastTemplateType toastTemplate = ToastTemplateType.ToastText02;

// Retrieve the content part of the toast so we can change the text.
XmlDocument toastXml = ToastNotificationManager.GetTemplateContent(toastTemplate);

//Find the text component of the content
XmlNodeList toastTextElements = toastXml.GetElementsByTagName("text");

// Set the text on the toast. 
// The first line of text in the ToastText02 template is treated as header text, and will be bold.
toastTextElements[0].AppendChild(toastXml.CreateTextNode(toastHeading));
toastTextElements[1].AppendChild(toastXml.CreateTextNode(toastBody));

// Set the duration on the toast
IXmlNode toastNode = toastXml.SelectSingleNode("/toast");
((XmlElement)toastNode).SetAttribute("duration", "long");

// Create the actual toast object using this toast specification.
ToastNotification toast = new ToastNotification(toastXml);
toast.group ??????????????????
return toast;

如果我写 toast. 组 属性 不会出现。使用 toast.group 我得到一条红线。

由于您使用的是 C#,因此它应该是 toast.Group。属性和方法总是大写。

至于属性组为什么没有出现,也许是Intellisense给了?我经常这样做。