如何使用 PushSharp 为 Windows Phone 8 设置徽章值

How to set Badge value for Windows Phone 8 using PushSharp

我可以使用 PushSharp but i couldn't see any option for Notification Badge.
向 Windows Phone 发送推送通知 我正在使用以下代码向 Windows 台设备

发送通知
int badge = (String.IsNullOrEmpty(model.NotificationBadge)) ? 0 : int.Parse(model.NotificationBadge);
var push = new PushBroker();
push.OnNotificationSent += NotificationSent;
push.OnChannelException += ChannelException;
push.OnServiceException += ServiceException;
push.OnNotificationFailed += NotificationFailed;
push.OnDeviceSubscriptionExpired += DeviceSubscriptionExpired;
push.OnDeviceSubscriptionChanged += DeviceSubscriptionChanged;
push.OnChannelCreated += ChannelCreated;
push.OnChannelDestroyed += ChannelDestroyed;
push.RegisterWindowsPhoneService();
push.QueueNotification(new WindowsPhoneToastNotification()
     .ForEndpointUri(new Uri(model.ChannelURI))
     .ForOSVersion(WindowsPhoneDeviceOSVersion.Eight) 
     .WithBatchingInterval(BatchingInterval.Immediate)
     .WithNavigatePath(model.NavigatePath)
     .WithText1(model.NotificationText1)
     //.WithParameter("badge", "1")
     .WithText2(model.NotificationText2));

有人知道吗how to send the Notification with Badge to the Windows Devices

您的 comments/suggestion 将不胜感激!

假设您指的是 Windows Phone 设备的磁贴徽章,您需要发送带有计数参数的磁贴通知 (WindowsPhoneTileNotification)设置,不是吐司通知。