I couldn’t locate a Visual Studio project template for creating a windows phone 7 custom control library. So….I decided to make one. It is pretty straight-forward to create one by hand but the second time the process becomes a bit tedious..
Since it is practically the same as creating custom controls in wpf and silverlight it has been well documented. Here’s a clear and recent, phone-specific write-up http://www.windowsphonegeek.com/articles/7-Mistakes-Developer-make-when-implementing-Windows-Phone-Custom-Controls which points out some common errors.
Anyway, here’s the installation instructions:
- Find the folder used by visual studio for ‘user project templates location’ (Navigate to Tools > Options > Projects and Solutions and it will be in the right pane – see image below) and download and copy this zip file to that folder.
- Extract all files
(This should result in a further zip file called ‘WP7 Custom Control’ being extracted to a subfolder called ‘Silverlight For Windows Phone’).
Next time you open the create new project dialog there should be an entry for a ‘Windows Phone Custom Control Library’ as shown below:
which, when selected will result in a project structure illustrated below..
By the way, to create a project template simply create or locate a project to base the template on and select File > Export Template in Visual Studio. See http://msdn.microsoft.com/en-us/magazine/cc188697.aspx for further details.
Technorati Tags: windows phone,wp7dev,custom control,template,Visual Studio,library,Developer,Windows,templates,Projects,Control
Windows Live Tags: windows phone,wp7dev,custom control,template,Visual Studio,library,Developer,Windows,templates,Projects,Control
WordPress Tags: windows phone,wp7dev,custom control,template,Visual Studio,library,Developer,Windows,templates,Projects,Control
Suggestion for your blog. Add WordPress categories to your blog posts, then add the Category Cloud gadget to your blog side bar like I’ve done here: http://karlshifflett.wordpress.com/ This will make finding previous posts on your blog very easy.
Like your content. Great work.
Best,
Karl
Hi Karl,
Thanks for the suggestion – I’ve added the categories now. Looks like you have some great content on your blog too!
Nice.
Awesome! Its genuinely amazing paragraph, I have got much
clear idea regarding from this piece of writing.