Telerik UI for Windows Phone by Progress

Adding a RadCloudNotificationControl instance in your Windows Phone application

The following steps will guide you through the process of setting up a RadCloudNotificationControl instance on a Windows Phone page:

  1. The RadCloudNotificationControl exposes the ShowFirstNotificationAsync method which will automatically check for pending notifications and will display a popup displaying the first one. Depending on the notification type, a certain action will be performed. Define a async method on the main page of your app and implement the following logic:

    CopyC#
    private RadCloudNotificationControl notificationsCenter;
    // Constructor
    public MainPage()
    {
        InitializeComponent();
        this.notificationsCenter = new RadCloudNotificationControl(typeof(EverliveNotificationItem));
        this.CheckForNotifications();
    }
    
    private async void CheckForNotifications()
    {
        await this.notificationsCenter.ShowFirstNotificationAsync();
    }

  2. The default object type that the RadCloudNotificationControl uses is called EverliveNotificationItem. This type is associated with the Telerik Everlive Cloud services. If you need to extend the notification objects with additional properties, you will need to inherit from this type, otherwise you can use it out-of-the-box. To make sure the RadCloudNotificationControl is able to work with the Telerik Everlive Cloud Service, you will need to create the content type where the notifications will be stored. In the default case the content type should be named as the default notification item type: EverliveNotificationItem. If you want to change this, you should inherit from EverliveNotificationItem and use the ServerTypeAttribute to specify a new content type name for the picture objects.

    Create a new Content Type on the Everlive portal that will strore the notifications information.

    The created content type should contain the following structure:

    Cloud Controls Everlive Notification Item