AppNotificationBuilder.AddProgressBar(AppNotificationProgressBar) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
앱 알림에 대한 XML 페이로드에 진행률 표시줄을 추가합니다.
public:
virtual AppNotificationBuilder ^ AddProgressBar(AppNotificationProgressBar ^ value) = AddProgressBar;
AppNotificationBuilder AddProgressBar(AppNotificationProgressBar const& value);
public AppNotificationBuilder AddProgressBar(AppNotificationProgressBar value);
function addProgressBar(value)
Public Function AddProgressBar (value As AppNotificationProgressBar) As AppNotificationBuilder
매개 변수
알림에 추가할 진행률 표시줄을 나타내는 AppNotificationProgressBar 입니다.
반환
추가 메서드 호출을 연결할 수 있도록 AppNotificationBuilder instance 반환합니다.
예제
다음 예제에서는 앱 알림에 콤보 상자를 추가하는 방법을 보여 줍니다.
var builder = new AppNotificationBuilder()
.AddText("Downloading this week's new music...")
.AddProgressBar(new AppNotificationProgressBar()
.BindTitle()
.BindValueStringOverride());
var data = new AppNotificationProgressData(1 /* Sequence number */);
data.Title = "Artist Name"; // Binds to {progressTitle} in xml payload
data.Value = 0.5; // Binds to {progressValue} in xml payload
data.ValueStringOverride = "1/2 songs"; // Binds to {progressValueString} in xml payload
data.Status = "Downloading..."; // Binds to {progressStatus} in xml payload
var notification = builder.BuildNotification();
notification.Progress = data;
AppNotificationManager.Default.Show(notification);
결과 XML 페이로드:
<toast>
<visual>
<binding template='ToastGeneric'>
<text>Downloading this week's new music...</text>
<progress title='{progressTitle}' status='{progressStatus}' value='{progressValue}' valueStringOverride='{progressValueString}'/>
</binding>
</visual>
</toast>
설명
AppNotificationProgressData의 필드를 바인딩하여 초기 값을 설정하고 진행률 표시줄의 상태 업데이트합니다. 앱 알림의 진행률 표시줄에 대한 데이터 바인딩에 대한 자세한 내용은 앱 알림 진행률 표시줄 및 데이터 바인딩을 참조하세요.
AppNotificationBuilder API를 사용하여 앱 알림에 대한 UI를 만드는 방법에 대한 지침은 앱 알림 콘텐츠를 참조하세요.
앱 알림에 대한 XML 스키마에 대한 참조 정보는 앱 알림 콘텐츠 스키마를 참조하세요.
적용 대상
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기