Using the BPC InappToast Control

The InappToast is a part of Bewise Phone Controls current release. To use it, add the BPC library to your project.

This control allows the user to display an informational message. This message will be displayed for three seconds then will disappear. You can also force the message to hide by calling the Hide method.

To display the message, you just have to call the Show method of the Inapptoast control. The message to be displayed can be either set by the Message property, or by calling the overloaded Show(string message) method and passing your message in parameter.

 

<Bewise:InappToast Name="toast" OnClicked="InappToast_OnClicked"></Bewise:InappToast>

private void Button_Click(object sender, RoutedEventArgs e)
{
    if (lbItems.SelectedIndex != -1)
    {
        toast.Show("Deleting " + lbItems.SelectedItem + ". Click to hide message.");
        items.RemoveAt(lbItems.SelectedIndex);
        lbItems.ItemsSource = items;
    }
}

 

Here you can see how the control is rendered when the Show method is called:


Properties:

  • Message : gets or sets the message to display when the Show method is called

Methods:

  • Show : displays the message
  •  Hide : hides the message

Events:

  • OnClicked : this event is raised when the user clicks on the message toast

Last edited Feb 22, 2012 at 9:00 AM by guillaumelac, version 5

Comments

No comments yet.