Launchers related to MarketPlace in Windows Phone

In this post we will discuss three important launchers related to Windows Phone Market Place

  • MarketPlaceHubTask launcher
  • MarketPlaceReviewTask launcher
  • MarketPlaceDetailTask launcher

MarketPlaceHubTask launcher

This is used to launch Windows Phone Market Place client application. You can launch market place client application along with music content as below,

MarketplaceHubTask marketplaceHubTask = new MarketplaceHubTask();
marketplaceHubTask.ContentType = MarketplaceContentType.Music;

You can set content type of the search either as Application or Music. MarketPlaceContentType is defined as below,


Market place client application will be launched as below,


MarketPlaceReviewTask launcher

This is used to launch market place client application with review page. Market place application review page can be launched as below,

MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask();

It will ask user confirmation for Submit or Cancel. It will ask user confirmation for Submit or Cancel. After selecting submit option user will be redirected to review page of market place application.

MarketPlaceDetailTask launcher

This is used to launch market place client application with details page of specified application. You need to pass unique content identifier of application to get detail page of the application from market place. If you don’t set unique content identifier then detail page of current application will be launched in windows phone market place client application.

You can launch detail page of current application as below,

MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
marketplaceDetailTask.ContentType = MarketplaceContentType.Applications;

You can launch detail page of a specific application by passing content identifier.

These are three important launchers for market place client application and you may use them frequently in your application. I hope this post is useful. Thanks for reading.

WebBrowserTask and MediaPlayerLauncher in Windows Phone

In this post, we will see WebBrowserTask launcher and MediaPlayer launcher.

WebBrowserTask launcher launches web browser application and display specified URL. This is defined as below,


You can set target URL either as string or as Uri. User will be asked for the confirmation. You can navigate to a URL as below,

WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = new Uri("", UriKind.Absolute);

On running you will be navigated to given URL as below,


MediaPlayerLauncher is used to launch media player application and play the video from specified URL. This class is defined as below,


You can set desired controls of media player to be shown to user. Available media player controls are as below.


If you want to show more than one control to the user then you need to append them using OR operator and set them as value of control property.


You can also specify location of the media file in MediaLocationType property. MediaLocationType takes one of three values.




Install represents application installation directory, Data represents isolated storage and None value need to be set for external media.

You can play media with file from isolated storage as below,

MediaPlayerLauncher mediaPlayerLauncher = new MediaPlayerLauncher();

mediaPlayerLauncher.Media = new Uri("SongVideo.wmv", UriKind.Relative);
mediaPlayerLauncher.Location = MediaLocationType.Data;
mediaPlayerLauncher.Controls = MediaPlaybackControls.Pause |
mediaPlayerLauncher.Orientation = MediaPlayerOrientation.Landscape;


In this way you can work with MediaPlayerLauncher.

In this post we discussed on WebBrowserTask and MediaPlayerLauncher. You may need to call these native applications from your app. I hope this post is useful. Thanks for reading.

Code to search location on Bing Map

BingMapTask launcher is used to search a location and mark it on the Bing map. It is defined as below,


Search term need to be set as string. If geo coordinate of center is not provided then BingMapTask will search a location on basis of user’s current location.

Hospitals can be located and marked on the Bing map from user’s current location as below,

BingMapsTask bingMapsTask = new BingMapsTask();
bingMapsTask.SearchTerm = "hospital";
bingMapsTask.ZoomLevel = 2;

You can set the zoom level of the map as well. In this way you can search a location and mark that on Bing map.

I hope this post is useful. Thanks for reading.

MarketPlaceSearchTask in Windows Phone

MarketPlaceSearch Task launcher is used to launch Marketplace client application with the searched result set in the criteria. It helps to search to marketplace from the application.

MarketPLaceSearchTask is defined as below,


You can see in the definition that, you can set MarketplaceContentType and SearchTerms. MarketPlaceContentType is defined as below,


So it can take either Application or Music as value. Now if you want to search music in market place then you can do that as below,

MarketplaceSearchTask task = new MarketplaceSearchTask();
task.ContentType = MarketplaceContentType.Music;
task.SearchTerms = "Waiting for Tonight";

You will get Market place search application launched as below,


If you want to search any application like debugmode , you can search as below,

MarketplaceSearchTask task = new MarketplaceSearchTask();
task.ContentType = MarketplaceContentType.Applications;
task.SearchTerms = "debugmode";

You will get Market place search application launched as below,


In this way you can use MarketPlaceSearchTask. I hope this post is useful. Thanks for reading.


Clipboard API in Windows Phone

In this post we will see Clipboard API support in Windows Phone. Clipboard API support came as part of Windows Phone 7.5 and it was not part of Windows Phone 7.

Class is defined in System.Windows namespace as below,


You can set text as below,


In above snippet txtSource is a text box. You can check whether clipboard has some data or not as below,


One very important point you need to keep in mind that you cannot use GetText() method in Windows Phone. If you try to do that you will get security exception as below,


For security reason access to clipboard data is prohibited in Windows Phone. In this way you can use Windows Phone Clipboard API. I hope this post is useful. Thanks for reading .


MongoDB with CSharp

Before you start working with MongoDB using C Sharp, I recommend you to read MongoDB on Windows quick start in 5 minute and download MongoDB for CSharp from here

Start MongoDB server

If you would have gone through MongoDB on Windows quick start in 5 minute then you know how to start MongoDB server. However just for quick recap you need to start MongoDB server as below,

You can connect to MongoDB server as below by executing mongod exe


By default MongoDB stores data inside data folder of C Drive. You need to explicitly create this folder as well.

Add required library in solution

You will get a solution when you download MongoDB for CSharp from here . Open the solution in Visual Studio and build it.


Take MongoDB.dll and add this reference to your project.

Create Project and perform operations

For purpose of this blog post, I am going to create a console application. I have added MongoDB.dll as reference in console application project.

Create DataBase

If you want to create a database, you can create as below,


Above code will connect to MongoDB and create a database called Bloggers, if it does not exist.

Add Record in DataBase

You can add record as below,


Where blogger is collection you get over database as below,


Delete Record from DataBase


You can delete a record by just providing one key value as well like below,


Fetch a Record

To fetch a particular document or record you need to create document and provide key value as below.


FindOne() function returns a document . You need to call Get function with key value as input to fetch the value.

For your reference full source code is as below,

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MongoDB;

namespace ConsoleApplication34
class Program
static void Main(string[] args)

//Create Database
Mongo mongoDBdataBase = new Mongo();
var dataBaseToWork = mongoDBdataBase.GetDatabase("Bloggers");
//Create Collection
var blogger = dataBaseToWork.GetCollection("blogger");

//Insert Records
var b = new Document();
b["Name"] = "Dhananjay";
b["Country"] = "India";
b["Name"] = "G Block";
b["Country"] = "USA";

//Fetch Record
var searchBlogger = new Document();
searchBlogger["Name"] = "Dhananjay";
var result = blogger.FindOne(searchBlogger);



In this way you can perform operations on MongoDB using CSharp. I hope this post is useful. Thanks for reading.

MongoDB on Windows quick start in 5 minute

In this 5 minute post, we will do quick start for MongoDB on Windows. I will show you the way to connect to MongoDB Server and to start the administrative shell.

Very first you need to download 64 bit binaries for Windows 64 bit from here . After downloading unzip downloaded ZIP file at any location of your choice. After extracting rename folder to mongodB

Next navigate to folder in which you unzipped the downloaded binaries. You will get below executable file downloaded.


Most important exe are, Mongod.exe to connect to mongo database server and Mongo.exe to start administrative shell.

By default MongoDB creates database and store data in Data folder inside C Drive. You need to create this folder manually. You need to create them as below,


You can connect to MongoDB server as below by executing mongod exe


Once server is started, you can start administrative shell as below by executing mongo command.


From administrative shell if you want to add two numbers, you can do that as below,


By default, It connects to database test


If you want to insert data you can do that as below, below command will create a database called debugmode [only when first row is inserting] and then add name as dj.


You can explore Help option to know more about the executable and commands. In further article we will go deeper on same and explore working with MongoDB and CSharp.

I hope this post is useful. Thanks for reading


Creating Hello World Windows Azure Node.js Web Application

Node.js is enjoying much popularity and Glenn Block is helping us to bring it on Windows Azure. In this tutorial, I will walkthrough step by step to create your first Windows Azure Node.js Web Application. I have divided this tutorial in three parts as installing required SDK, creating Web Application and then publishing to Windows Azure portal. Purpose of this tutorial is to help you in setting up environment and publishing. In further tutorials we will dig deeper.

Install Windows Azure SDK for Node.JS

To start with Node.JS on Windows Azure you need to install Windows Azure SDK for Node.JS. You can Get Windows Azure SDK for Node.JS from here. You need to install it from Web Installer. You will get below dialog box to install Windows Azure SDK for Node.JS


After successful installation, you should get below confirmation dialog .


By this  step SDK has been installed on your machine.

Create Node Application

To create Node application, click on Start and then select Windows Azure PowerShell for Node.JS. Run this as administrator


On command prompt create a Node directory in C drive as below,


After creating Node directory you need to create a solution. You can create solution as below,


I have created a solution called MyApplication. You can see files created inside the solution is as below,


There are four files created. If you are coming from Windows Azure background, you must be aware of other three files than deploymentSettings.json file. deploymentSettings.json file stores local setting for Windows Azure PowerShell deployment cmdlets.

Next you need to add a WebRole to the solution. To add WebRole execute below PowerShell command. If you don’t provide any name then by default WebRole name would be WebRole1. However I am providing name as WebRoleForNodeJS


Now if you list files created inside WebRoleForNodeJS , you will find configuration files and a JS file.


Most important file is server.js. This file contains starter code for Node.JS. You need to add codes in this file. Go ahead and open this file in NotePad. As of now, I am leaving default code created by the tool.


var http = require('http');
var port = process.env.port || 1337;
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello NodeJS from Debugmode\n');

Run Locally on Windows Azure Emulator

To run it locally, go ahead and execute below PS command to start Windows Azure Emulator.


You can see is running in emulator as below,


Publish to Windows Azure Portal

To publish it to Windows Azure portal, first you need to take Publish Setting. You can take that as below,


You will be redirected to live login page. Sign in to download Publish Setting file. After login you should able to download PublishSetting file. Download file inside Node folder you created in previous steps.


Next you need to import PublishSetting file as below,


Note : Publishsettings file only needs to be imported once on the machine to set it up. You do not need to do that each time you create a service.

After importing PublishSetting file, you can publish to Windows Azure portal as below,


In above command name is the unique name and location is one of the Windows Azure Data center. After successfully publish operation , you should able to see Node.js running on Windows Azure portal.


This is what all required to create first application. In further post I will discuss much deeper on the same. I hope this post is useful. Thanks for reading

I have been awarded as Telerik MVP

What a morning it is! I am super excited to share that; I have been awarded as Telerik MVP


I got a mail from Holly Bertoncini community Relation Manager that I have been awarded as Telerik MVP. I am very excited to add one more MVP Title along with my name. This was never possible without unconditional support from you my readers.

My Telerik MVP Profile here

Thanks Note

This award was never possible without guidance and support of my dear friend Chris Eargle. Chris is Telerik Developer Evangelist, C#MVP, INETA Community champion and President of Columbia Enterprise Developer Guild.

I would also take this opportunity to thank Emily Jayne Hall for her continuous support. She is kind and great motivator. Emily is Community Program Manager at Telerik.

From community I would like to Thanks three wonderful people for their never ended support. Pinal Dave ,ShivPrasad Koirala and Abhishek Kant

About Telerik MVP Program


The Telerik MVP Program aims to recognize and reward the amazing people who are highly successful at their own jobs and yet find the time and energy to share their extensive knowledge and passion about Telerik products with fellow developers. The Telerik MVPs have been actively contributing to the evolution of our organization and spreading the word about our products to the community.

Read more about Telerik MVP Program

Benefit Of being Telerik MVP

  • Free licenses for Telerik products.
  • Involvement in product development.
  • First-hand look at Beta programs – you will be able to get the alphas, betas and pre-release builds of all Telerik products before anyone else.
  • Access to our internal MVP roadmap.
  • Direct communication channel with our product teams, you will have a chance to get to know the people that stand behind Telerik products and communicate directly with them.
  • Active community contributors will be invited to attend major conferences at our expense and be with us at the company booth.
  • Personal blog and spotlight posted on our website.
  • Exclusive discounts that can be passed on to colleagues including the ability to transfer available Telerik points to friends.
  • MVP SWAG packages sent to you twice a year with all kinds of awesome goodies.

Read more about benifits here

Last but not least I thank each one of your and hope to keep writing and helping you.