ToastNotifier.Show(ToastNotification) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 알림 메시지를 표시합니다.
public:
virtual void Show(ToastNotification ^ notification) = Show;
void Show(ToastNotification const& notification);
public void Show(ToastNotification notification);
function show(notification)
Public Sub Show (notification As ToastNotification)
매개 변수
- notification
- ToastNotification
표시할 알림 메시지의 내용이 들어 있는 개체입니다.
예제
다음 예제에서는 Show 메서드 사용을 포함하여 텍스트 및 이미지가 포함된 알림 메시지를 만들고 보내는 방법을 보여 줍니다.
var notificationManager = ToastNotificationManager;
var template = ToastTemplateType.ToastImageAndText01;
var toastXml = notificationManager.GetTemplateContent(template);
var images = toastXml.GetElementsByTagName("image");
images[0].SetAttribute("src", "images/toastImageAndText.png");
var textNodes = toastXml.GetElementsByTagName("text");
textNodes[0].AppendChild(toastXml.CreateTextNode("Text input 1"));
var toast = new ToastNotification(toastXml);
notificationManager.CreateToastNotifier().Show(toast);