Reminder Application in Windows Phone Mango


Reminder is currently in the Namespace Microsoft.Phone.Scheduler, sometime it can remind us some of work.

Idea of this Apps is very simply that you have a to do task, and when on time these Reminder will remind you !

In this article I'll talk about a Reminder Application in Windows Phone Mango.


The first step, We're creating Windows Phone Application Project

Reminder Application In Windows Phone Mango

Next, we right-click to References -> choose Add Refrences ->choose Microsoft.Phone.Controls.Toolkit :

Reminder Application In Windows Phone Mango

Then we go to MainPage.xaml and build a sample User Interface but after that we declare


To use the Control from the toolkit.

The second step, We go to Mainpage.xaml and built a sample UI include TimePicker, DatePicker, Button and TextBox for Reminder, like that:


Following XAML Code :

    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Reminder App" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="200"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="82*" />
            <TextBlock Text="Date" Grid.Row="0" Margin="14,0,0,0"/>
            <TextBlock Text="Time" Grid.Row="2" Margin="14,0,0,0"/>
            <TextBlock Text="To Do" Grid.Row="4" Margin="14,0,0,0"/>
            <toolkit:DatePicker Grid.Row="1" Name="dpkDate" />
            <toolkit:TimePicker Grid.Row="3" Name="tpkTime" />
            <Button Content="Save" Grid.Row="7" Height="72" HorizontalAlignment="Left" Margin="293,4,0,0" Name="btnSave" VerticalAlignment="Top" Width="160" />


The Finally, We coding for Reminder App in MainPage.xaml.cs.

Full C# Code :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Scheduler;

namespace ReminderApp
    public partial class MainPage : PhoneApplicationPage
        // Constructor
        public MainPage()
            this.btnSave.Click += btnSave_Click;
        void btnSave_Click(object sender, RoutedEventArgs e)
            DateTime _Date = dpkDate.Value.Value;
            TimeSpan _Time = tpkTime.Value.Value.TimeOfDay;
            _Date = _Date.Date + _Time;
            String _Content = txtContent.Text;
            if (_Date < DateTime.Now)
                MessageBox.Show("Your time is not match !\nPlease Enter again !");
            else if (String.IsNullOrEmpty(_Content))
                MessageBox.Show("Your task can't be empty !\n Please enter to do task !");

                ScheduledAction _OldReminder = ScheduledActionService.Find("TodoReminder");                if (_OldReminder != null)
                Reminder _Reminder = new Reminder("TodoReminder")
                    BeginTime = _Date,
                    Title = "Reminder",
                    Content = _Content,
                MessageBox.Show("Set Reminder Completed");

Result :

Reminder Application In Windows Phone Mango

It's Remind on time :

Reminder Application In Windows Phone Mango

I hope this useful . Thanks for reading !

/*It's time for Windows Phone*/

Similar Articles