Building Interactive Alarm Clock for Windows Phone

Alarm Clock is an interactive tool for Windows Phone, Windows Surface (Win RT) devices available on marketplace which majorly focus on Alarm settings, Time Settings, execute alarm under locked screen. This article majorly focused on implementing an interactive Alarm Clock for Windows Phone 7.5 & 8 devices having Alarm Clock settings under locked screen, snooze alarm by pressing anywhere on main screen of the app & clock in 24X7 format.


  • The default main screen simply shows up the current time on 12 hour/24 hour basis with seconds time display on enhancement with necessary settings options.


  • Once you click on set alarm option , you would find the alarm time setting option which is based on TimePicker control for Windows Phone.



  • Once time is set, you are good to go & check the Alarm settings on your main screen. The same effects under lock screen too while you can lock the screen from the app itself.

lock screen

  • Next, Check the main settings options for this app which has clock setting on 24X7 basis along with vibrations options during alarm bell ringing. Initially all the settings have to be stored on Isolated Storage.

setting pane

  • The apps background color is changable & you can set your own forefround colors & themes based on phone settings. Alarm Time can be snoozed by pressing anywhere on main screen & displayed under locked screen itself.


  • The Alarm Sound can be changed based on user choice , for this you need write your own class as SoundEffects.cs :

using  System;

using  System.Net;

using  System.Windows;

using  System.Windows.Controls;

using  System.Windows.Documents;

using  System.Windows.Ink;

using  System.Windows.Input;

using  System.Windows.Media;

using  System.Windows.Media.Animation;

using  System.Windows.Shapes;

using  System.Windows.Resources;

using  Microsoft.Xna.Framework.Audio;

using  System.IO;

namespace  AlarmClock


public static class SoundEffects


public static void Initialize()


     StreamResourceInfo info;

info = App.GetResourceStream(newUri(“Audio/whistle.wav”, UriKind.Relative));

Alarm = SoundEffect.FromStream(info.Stream);

CompositionTarget.Rendering += delegate(object sender, EventArgs e)


Microsoft.Xna.Framework. FrameworkDispatcher.Update();


Microsoft.Xna.Framework. FrameworkDispatcher.Update();


public static SoundEffect Alarm { get; privateset; }



  • The complete Interactive Alarm Clock app for Windows Phone 7.5 & Windows Phone 8 source code  is shared here.

About Anindita
Anindita Basak is working as Big Data Cloud Consultant in Microsoft. Worked in multiple MNCs as Developer & Senior Developer on Microsoft Azure, Data Platform, IoT & BI , Data Visualization, Data warehousing & ETL & of course in Hadoop platform.She played both as FTE & v- employee in Azure platform teams of Microsoft.Passionate about .NET , Java, Python & Data Science. She is also an active Big Data & Cloud Trainer & would love share her experience in IT Training Industry. She is an author, forum contributor, blogger & technical reviewer of various books on Big Data Hadoop, HDInsight, IoT & Data Science, SQL Server PDW & PowerBI.

2 Responses to Building Interactive Alarm Clock for Windows Phone

  1. myousri says:

    What a very interactive alarm… good work…:)
    By the way, the source code is not available anymore, would you please share it?

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: