Array

User Interface Notifications

Must Read

Surveys

If you have a specific information requirement and a definable audience, it is likely you can collect useful survey...

ACS Student Loans Consolidation – Pros and Cons Explained

Loans provided by the government have given students the opportunity to obtain a college education. But in some occasions,...

Debt Consolidation Personal Loan – Pay Only a Percentage of the Total Debt

When you sign up for a personal debt consolidation loan, it is possible that you may very well wind...

Reasons Why Debt Consolidation Loans Are a Great Idea to Getting Debt Free

Financially, the life of a student is not an easy one. The cost of an education is not cheap....

Get a Low Interest Debt Consolidation Loan

When it's time to consolidate all your bills and get a grip on your debt, you'll probably want to...

How Private Loan Consolidation Can Prevent the Stretching of Your Paycheck to Breaking Limit

Americans are in a heap of debt trouble today. According to the American Payroll Association:"67% of Americans would find...
Admin
test

The Tailspin Surveys mobile client application performs some tasks asynchronously; one example is the potentially time-consuming synchronization with the Tailspin Surveys web service. Asynchronous tasks must often inform the user of the outcome of the task or provide status information while they’re running. It’s important to consider the usability of the application when you’re deciding on the appropriate way to notify users of significant events or to provide status information. The developers at Tailspin were concerned they would either flood the user with alerts or have the user miss an important piece of information.

For the Tailspin Surveys mobile client application, the developers identified two categories of notification,  informational/warning notifications and error notifications.

Informational/Warning Notifications

Informational or warning notifications should not be disruptive, so the user should see the message but not be interrupted in their current task. The user does not need to perform any action in response to this type of message; the Tailspin mobile client application uses this type of notification to inform the user when a synchronization completes successfully, for example. Tailspin uses a custom toast notification for these messages because the application does not have access to the Windows Phone 7 toast notification system.

Error Notifications

Error notifications should be disruptive because the message is informing the user that some expected action of the application will not happen. The notification should inform the user of the actions they need to take to resolve the problem; for example, to retry the synchronization operation again if it fails for some reason. Tailspin uses message boxes for this type of message.

Inside the Implementation

This example shows how Tailspin implements custom toast notifications and error notifications on the SurveyListView page to inform users when the synchronization process finishes or fails. In the sample application, many of the notifications and error messages are not intended for the imaginary user of the sample; instead, they are there to
help you, the developer understand what the application is doing as you explore its functionality. You should follow the guidance published in the UI Design and Interaction Guide for Windows Phone 7 (http://go.microsoft.com/fwlink/?LinkID=183218) when you design the user notification system for your application.

The following code example shows the relevant declarations in the SurveyListView.xaml file.

XAML
<prismInteractionRequest:MessageBoxRequestTrigger RequestBinding=
“{Binding SubmitErrorInteractionRequest}”/>
<prismInteractionRequest:ToastRequestTrigger
RequestBinding=”{Binding SubmitNotificationInteractionRequest}”
PopupElementName=”SynchronizationToast”/>

<Popup x:Name=”SynchronizationToast”>
<Grid Background=”{StaticResource PhoneAccentBrush}”
VerticalAlignment=”Bottom” Width=”480″>
<TextBlock Text=”{Binding Title}”
HorizontalAlignment=”Stretch” Foreground=”Black”
TextWrapping=”Wrap” Margin=”14,5,14,5″>
<Custom:Interaction.Behaviors>
<pag:PopupHideOnLeftMouseUp/>
</Custom:Interaction.Behaviors>
</TextBlock>
</Grid>
</Popup>

The view model uses the SubmitNotificationInteractionRequest binding to trigger the toast notification and the SubmitError InteractionRequest binding to trigger the error message notification. The following code example shows how the SurveyListViewModel displays a toast notification when the synchronization process completes successfully and an error message when it fails.

C#
private readonly InteractionRequest
<Microsoft.Practices.Prism.Interactivity.InteractionRequest
.Notification> submitErrorInteractionRequest;
private readonly InteractionRequest
<Microsoft.Practices.Prism.Interactivity.InteractionRequest
.Notification> submitNotificationInteractionRequest;

public IInteractionRequest SubmitErrorInteractionRequest
{ get { return this.submitErrorInteractionRequest; } }
public IInteractionRequest SubmitNotificationInteractionRequest
{ get { return this.submitNotificationInteractionRequest; } }

private void SyncCompleted(
IEnumerable<TaskCompletedSummary> taskSummaries)
{

if (taskSummaries.Any(
t => t.Result != TaskSummaryResult.Success))
{
this.submitErrorInteractionRequest.Raise(
new Microsoft.Practices.Prism.Interactivity
.InteractionRequest.Notification
{ Title = “Synchronization error”, Content =
stringBuilder.ToString() },
n => { });
}
else
{
this.submitNotificationInteractionRequest.Raise(
new Microsoft.Practices.Prism.Interactivity
.InteractionRequest.Notification
{ Title = stringBuilder.ToString(), Content = null },
n => { });
}

}

 

Note: This solution uses the InteractionRequest and Notification classes and two custom behaviors, Message BoxRequestTrigger and ToastRequestTrigger, from the Prism Library.

 

Latest News

Digital Marketing for Beginners

Digital marketing for starter, Let to basic learning about connecting with your audience in the right place at the...

What are 7 things poor people do that the rich don’t?

1. poor people watch TV in which people read books how many hours you spend in front of the TV and when was the...

Top 18 best small business ideas for beginners starting

A small business can be frightening and requires plenty of careful planning there are many small business ideas which can be beneficial as well...

Summer that makes you happy

We saw were already here I've been thinking about some of the things. I used to do with my husband even though he had...

4 Point to helpful tips specifically for caregivers

What you need to take a vacation. I know it sounds impossible creative and try to make it work for you almost everyone needs...

More Articles Like This