After installing Windows Phone 7 SDK, when you start Visual Studio 2010 and Click on New Project or immediately after starting Visual Studio 2010, Visual Studio crash run following command in Visual Studio Command Prompt by going to Start > All Programs > Visual Studio 2010 > Visual Studio Tools > Visual Studio Command Prompt
devenv.exe /installvstemplates
Cause: if you run devenv.exe /Log C:\output.txt in your txt file you will notice that there are some duplicate entries for the Project Templates. By running above specified command it will reinstall VS Templates, and solve the issue.
Hello.. We had seen how to develop an application for Windows Phone 7. We had seen a very basic application Hello World Application. We will see more later. This blog is for those who are ready with their applications or will be ready with their application. In my blog am going to explain the steps how you can submit your application on Marketplace.
So we have to start with creating an account. Once it’s done go to this site http://create.msdn.com/en-US/ . Login onto this site with username and password of the account created. Once you login you will get below image on your screen.
On left hand side you can see written Submit for Windows Phone. As the name suggests, if you want to submit your windows phone application you can click here for further procedure. Basically, this is a 5-step procedure which you have to complete for submitting your application on Marketplace.
I will explain you these steps in detail once step by step. So back to Home page. When you will click on “Submit for Windows Phone”, you will a form of “upload” on your screen. You need to upload .xap file of your application. Now what is .xap file.
A .xap file is basically a compiled Silverlight application. The file is actually a .zip file that contains all the files necessary for the application. Just rename the .xap file to have a .zip extension and then you can open it up to see its contents. The .xap file contains an application manifest (AppManifest.xaml) file and all the necessary DLL's that are required by the application. This .xap file is placed in \Bin\Release or \Bin\Debug.
This .xap file to upload should not exceed than 400MB. In the form you can see, Application name. Give your application name. In Application Platform select Windows Phone 7. In language select English language. In version select the version which you have used. In Application Package upload your application. Below two are optional things. Once your upload form filling is done, click Next. It will take you to next step, “description”.
Above image shows how your description form will be. It consist complete description of your application. Depending on this form users will decide to buy your application or not as they will get complete description of your application. So I will suggest you to use many keywords so that it’s easy to for users to find your application. Now let’s see details about form. 1st is application title. You can write here according to your application. Similarly you can select category according to your application. Next is the detailed description. This is the main thing which user will go through. So write as much as possible. Next is optional part. Next field is keywords. Write as many keywords as I mentioned above. Legal URL field is optional. Then is Support Email Address. This field is also optional. But I will suggest you to add this email so that if any user has any issues or questions with your application he can mail you those solutions. So that once you solve those issues user will be satisfied completely. So it’s better to add Support Email Address. Required device capabilities field. This includes the requirements for your application.
Once your upload form filling is done, click Next. It will take you to next step, “artwork”.
Above image shows your artwork form. Artwork form includes tiles or images of your application. This will attract user to buy your application. Large mobile app tile and Small mobile app tile includes tiles of your application. Large has size of 173 X 173px and Small has 99 X 99px. Similarly size of Large PC app title is 200 X 200px. For creating this image you can use Paint.Net or Photoshop. Talking about images, you have to adjust your application image dimensions same like mentioned above. Even if it changes a bit, it will fail. Next field is Background art which is optional field. Next is screenshots. You can add screenshots of your application in this field. With these screenshots user will get proper idea about your application. You can add upto 8 screenshots. Its size is 480 X 800px.
Once your upload form filling is done, click Next. It will take you to next step, “pricing”.
Above image shows your pricing form. In this, 1st field is for trial mode. If your application has trial mode, tick this field. Next is worldwide distribution tick it as your application will be up for whole world. Primary offer currency, you can set this according to your convenience. You can set it as USD etc. Application Price is the price of your application. Set it as per your calculation. You can submit 5 free applications per account.
Once your upload form filling is done, click Next. It will take you to next step, “submit”.
This is the last form. There is only 1 option in this form. Automatically publish to Marketplace after passing certification. Tick this. Once you tick this click on button “Submit for certification” below.
So you are done with submitting your application in Marketplace. Once it’s done you can visit your app hub to see the status. Most of the Windows Phone 7 apps are being tested / approved within a few days. Its same as below image.
If your app fails testing, then Microsoft will send you an email detailing the reason for failure.
This is all with this blog. Will be back soon with few more blogs regarding Windows Phone 7!!! Till that time bye and enjoy development for Windows Phone 7.
Hello all. I am back with my blogs once again. This time I am going to write a blog on a current hot topic. Guessed correct!!! Windows Phone 7. All are excited with WP7 topic. Not only for use but also for development of WP7 applications. So for what are we waiting? Let’s start building applications.. I will start with a very basic application and as we all know our tradition “Hello World Application”. I will include screenshots for each of my step so that it’s easy for you to understand visually too. So let’s start…
Step 1-
Let’s start from very basic part – creating new project. Go to File -> New -> Project.
You will get a screen where you will get options. Check on left hand side, select a language C# or VB and select Silverlight for Windows Phone. After selecting it you will get options regarding Windows Phone Applications on right hand side. Select 1st option – Windows Phone Application. Give your application name below. I have given it name WP7HelloWorld.
Step 2-
You will get a screen where you can see two splitted windows. On left side you can see WP7 device and on right side you can see XAML code. You can design on device using tools from toolbox. If you want to make changes in design through code you can do it on right side.
On top of the device its written My Application this is the name of the title which you can change. Just below is written page name. This also you can edit according to your application. In my application I have changed “My Application” to “Hello World Application” and similarly have changed “page name” to “Hello World”.
Step 3-
Next step we going to do is placing controls. I am going to use 1 textbox where we will take input from user (will take their name as input), 1 button on clicking of which will display output and 1 textblock (which is label in windows forms) to display output. In below screenshot you can see the alignment of these 3 controls. You can select these controls from toolbox which you can see on left side. If toolbox is not visible you can view it from View -> Toolbox.
Step 4-
We want to execute application when user clicks on button. So let’s write code on button click event.
Now what exactly we going to do in our application is, we will take name as input from user through textbox and once user clicks on button we will display “Hello ……” in textblock. So we are going to write the code as shown in below screenshot.
Step 5-
In this step I am just increasing the font size of textblock so that output is properly visible to the user.
Step 6-
Now press F5 to run your application and you will get a screen as shown in below screenshot. This is known as emulator. In your Visual Studio you can see 1 dropdown just below menubar which gives you options as Windows Phone 7 Emulator or Windows Phone 7 Device. If you have actually device you can connect it to your machine and run this application directly on your device. If you don’t have a device not to worry we have Emulator. You can run your application on Emulator by choosing Windows Phone 7 Emulator in that dropdown. Now back to your application running on emulator. You can see the UI which you had designed.
Once user clicks on textbox a keyboard will be popped up from below. If your machine has touch screen you can actually do typing by touching screen and get actual feel of device. If you don’t have touch screen to your machine simply click using mouse on the particular characters which you want to insert in textbox.
Once it’s done click on button and you will get your output below. You can see the output in below screenshot.
That’s it!!! Your application is ready!!! I will be back soon with more bogs on Windows Phone 7. Till that time. Good bye :-)
A 2 days workshop on .NET was held in Vishwakarma Institute of Information Technology (VIIT) College on 5-6 October 2010. This was on intercollegiate level and was supported by Microsoft. Almost 150 students from different colleges all over Pune attended this workshop. Students from FE-BE attended it. Workshop included basics of .Net, ADO.Net, ASP.Net, Cloud Computing, Windows Phone 7 etc. We also conducted practicals mainly on basics of .Net and also on ASP.Net and ADO.Net. Was a challenging job as FE and SE students were blank about all these things and had to make them understand each and everything including logic. But overall nice workshop. And being alumni of this college was nice experience to take training in same college.
A 2 days workshop on VB.NET was held in Indira College on 21-22 August 2010. This was held by Pune University for professors of TY BCA (Pune University). There were almost 40 professors from different colleges all over Pune. Workshop included basics of .Net, ADO.Net, etc. We also conducted practicals which were conducted by me. I performed all practicals which were included in their syllabus. Was a nice experience.
Microsoft’s Community Tech Days was held in Pune on 17th July 2010. It was another successful event in Pune volunteered by Pune User Group (PUG) members. Keynote was given by Mr. Daniel. Next sessions were presented by Vivek Venkatesh on Programming in right way, an exciting session on Windows Phone 7 by Mayur Tendulkar, Expression Blend 4 by Pravinkumar Dabade. Last session was given by me on Visual Studio Tools for Office (VSTO). I presented introductory session on VSTO. It included theory part also with 6-7 demos which included excel, word, outlook demos. Almost 80-90 people attended event. In all nice event!!!
Hello all. I am back with another interesting blog. This blog is on Bing Maps. We all use maps to find out any location anywhere in world. Suppose I want to find out location of Pune in India how will we search? Simple! Open maps put Pune, India in its search box and it will give you location of Pune. Now when we get Pune we also get some image on map which is known as pushpin which points out the location which you have searched. Now many of you must be thinking from where we get this. But it’s very simple. We can actually code for that using Bing Maps and get it done! Let’s see few things related to Bing Maps.
In this blog we will see following things related to Bing Maps:- 1) Add Pushpin 2) Delete Pushpin 3) Add Polyline Let’s start with 1st part Add Pushpin. Before that we need to include a script to get map in our browser.
var icon = "<div><img src='images/greenpushpin.png' alt='green pin' width='30px' height='30px'/></div>"; var infobox = "<div style='width:309px;'>This is green!!! Run!!!</div>";
function AddPushpin() { shape = new VEShape(VEShapeType.Pushpin, new VELatLong(19.0177, 72.8562,2272)); shape.SetCustomIcon(icon); map.ClearInfoBoxStyles(); shape.SetTitle("<h2>Pin</h2>"); shape.SetDescription(infobox); map.AddShape(shape); }
In this above function we have used method VEShape to create a shape to which we going to call pushpin. We have VEShapeType.Pushpin as its parameter to get shape pushpin on the map. VELatLong is a method which takes parameters latitude and longitude where by default that pushpin will be placed. We can also dynamically take latitude and longitude as parameters in AddPushpin() function. This will result into following,
We can see in this image above the result of AddPushpin(). We can see a spot marked in red which is pushpin of red color which is place on location Pune.
2) Delete Pushpin :-
Next we will see DeletePushpin.
function DeletePushpin() { if (shape) map.DeleteShape(shape); shape = null; }
This code is used to delete pushpin from Bing Maps. We have a specific function DeleteShape() to delete pushpins where we can call the shape which we had added using AddPushpin() and then set that shape to null.
3) Add Polyline :-
Lets now see how to add polylines. First we will see how to add button in body part clicking on which we can start adding polylines. For that we need to write following code,
<body> <input type="button" id="cmdDraw" value="Click to begin drawing" onclick="startDrawing();" /> <div>Drawing Mode: <span id="ModeIndicator">Disabled</span></div> </body>
var polyline = null; var polylineMask = null; var points = new Array(); var maskPoints = new Array(new VELatLong(0, 0), new VELatLong(0, 0)); var drawing = false;
function GetMap() { map = new VEMap('myMap'); map.LoadMap(new VELatLong(19.0177, 72.8562), 5, false); polylineMask = new VEShape(VEShapeType.Polyline, maskPoints); polylineMask.HideIcon(); polylineMask.Hide(); polylineMask.SetLineColor(new VEColor(0, 0, 255, 0.5)); polylineMask.Primitives[0].symbol.stroke_dashstyle = "Dash"; map.AddShape(polylineMask);
function mouseMoveHandler(e) { if (drawing) { var loc = map.PixelToLatLong(new VEPixel(e.mapX, e.mapY)); if (points.length > 0) { polylineMask.Show() }; maskPoints[1] = loc polylineMask.SetPoints(maskPoints); } }
function mouseDownHandler(e) { if (drawing) { currentLatLon = map.PixelToLatLong(new VEPixel(e.mapX, e.mapY)); points.push(currentLatLon); maskPoints[0] = currentLatLon;
if (points.length > 1) { if (!polyline) { polyline = new VEShape(VEShapeType.Polyline, points); polyline.HideIcon(); map.AddShape(polyline);
function keyPressHandler(e) { if (drawing && e.keyCode == 27) { drawing = false; map.vemapcontrol.EnableGeoCommunity(false); document.getElementById("ModeIndicator").innerHTML = 'Disabled'; document.getElementById("cmdDraw").value = 'Click to begin drawing'; document.getElementById("cmdDraw").disabled = false; polylineMask.Hide(); } }
In the above code we have given user his choice to choose locations and draw polyline. We have used a button on clicking of which user can start drawing polygon and once it press ESC button on keyboard he will stop drawing polygon. For drawing polyline we have set line width, its color etc using a method VEColor. For drawing polylines we have used mousehandlers and keypress handler events. We have used mousehandlers for clicking on location and start drawing polyline and keypresshandler to use ESC button once polylines drawing is finished. To check whether drawing is finished and user has pressed escaped or not we have used a boolean variable drawing.
Result we can show in below video.
This way we can add pushpins, delete pushpins and draw polylines.
Microsoft’s biggest event in India, TechEd, was held on 12-13-14 April 2010 in Bangalore. It was held in Lalit Hotel. Almost 2000-2500 people attended this event. I also got a chance to attend this event. Many dignitaries like S.Somasegar, Moorti Uppaluri, Stephanie Saad Cuthbertson, Sanjay Vyaas etc gave keynotes and sessions. It was in all a 3-day event which included 7 parallel tracks. All technologies for developers and IT Professionals was covered in this event. On 1st day after registrations, event started at 9:30 am with a welcome note of Mr. Moorthy Uppaluri which was continued by S.Somasegar with keynote and Visual Studio 2010. Launch of Visual Studio 2010 was a prime attraction of this event. Everyone was interested to know new features of Visual Studio 2010 which was shown by Stephanie Saad Cuthbertson and Paula Willis through interesting demos. Other sessions included ASP.Net, Cloud Computing, VS 10 programming, securing infrastructure etc. On 2nd day interesting sessions for me were Windows 7 phone development track. Awesome demos were showed by Mr. Vivek Dalvi. We also had sessions on Windows 7, Sharepoint 2010, Office 2010. Architect’s track included session like Concept Visualization by Mr. Sanjay Vyaas. On 3rd day there were individual tracks for Sharepoint Development, Azure, RIA (Silverlight) etc. Speakers like Mr. Nitin Paranjape, Mr. Raj Choudhary, Mr. Harish Ranganathan etc had their sessions on 3rd day. We also had Demo Extravaganza everyday after all sessions concluded. In this section many people got chance to show their talent. One of the most amazing demo was Buddy Home and Robo war and dance demonstrated by Ramaprasanna Chellamuthu. Also 2 college boys demonstrated their project of philontrophy which was one more amazing demo. There was another special section called Community track in which MVPs, Industry Experts gave sessions which were very deep technically and also were very understanding. For e.g. Mr. Dhaval Faria gave a session on F#. We had another section called Hands on which helped people to get practical knowledge of technologies. Event also included a Partner stalls in which parteners like Accenture, Telerik, Sapient etc had put their stalls. Many goodies were distributed there like tshirts, cds etc. We also had MTv VJ Mr. Nikhil Chinappa attending the event. We really had a nice time enjoying this event.