


Right click your project’s name on the Solution Explorer and select Add -> New Item…

Just for verification, you can see that the toolbox doesn’t have the Switch control that you so desperately need! No worries, we will create one ourselves. Now you should be able to see the initial project that the Visual Studio has created. Select Windows Phone OS 7.0 as we won’t need something that came with the 7.1 SDK. If you have both Windows Phone SDK 7.0 and 7.1 installed you will be prompted to select one. Then select Visual C# -> Silverlight for Windows Phone -> Windows Phone ApplicationĪt the bottom give the Name SwitchProject to your project. Start Visual Studio then go to File -> New -> Project… Let us first create a Windows Phone project. We will create a custom Control to use as an on/off switch. Expression Blend is a very powerful tool and easy to use in order to quickly achieve very common but also time consuming jobs.įor this article you will need Visual Studio 2010 and Microsoft Expression Blend. That’s because, in this article, I’ll try to vanquish the fear of someone else (even a tool) editing your code and the belief that everything is bestĭone when done in code. This article’s title could more accurately be “Breaking the ice between the developer and Expression Blend”. Controls that are often used or found in other applications that came preinstalled with the phone are not in your Toolbox (like the on/off switch of the Settings application). In our case, Windows Phone, you will be surprised how few Controls are at your disposal.

A time consuming process including many application runs and debugging until achieving a satisfying result. But what if there isn’t a Control that fits exactly to your needs? At those times you were relying on your code.ĭrawing on Canvas on some platforms or extending other Controls and overriding onPaint methods on other. IntroductionĪren’t there times where you need to add a Control in your Form or Page while in designer mode? Yes, the first place to look is your Toolbox. This tutorial provides a step-by-step guide to creating custom UI controls using Expression Blend, using the example of a simple on-off switch.
