Telerik UI for Windows Phone by Progress

Adding a RadCloudRegistration instance in your Windows Phone application

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

  1. Define a XAML namespace in the XAML file of your page as follows:

    CopyXAML
    xmlns:telerikCloudControls="clr-namespace:Telerik.Windows.Controls.Cloud;assembly=Telerik.Windows.Controls.Cloud"

  2. Define a RadCloudRegistration instance on the page as follows:

    CopyXAML
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="TELERIK CLOUD SYNCHRONIZATION" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock Text="register" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>
    
        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <telerikCloudControls:RadCloudRegistration
                x:Name="registrationControl"/>
        </Grid>
    </Grid>

    The page should be looking as follows:

    Cloud Controls Registration 1

  3. Provide a handler for the RegistrationSuccess event exposed by RadCloudLogin:

    CopyXAML
    <telerikCloudControls:RadCloudRegistration
            RegistrationSuccess="registrationControl_Success"
            x:Name="registrationControl"/>

  4. Implement the event handler as shown in the code snippet below:

    CopyXAML
    private void registrationControl_Success(object sender, EventArgs e)
    {
        if (this.NavigationService.CanGoBack)
        {
            this.NavigationService.GoBack();
        }
    }