I have created an abstract page that inherit PhoneApplicationPage. I want every page in my project to inherit this Abstract Page. Right now I always creates new PhoneApplicationPage and change the extension manually.

Is there any way to auto-generate a class that extends my custom PhoneApplicationPage?

有帮助吗?

解决方案

Create a blank page in your project and have it inherit from your base class. Then create your own Visual Studio template from that page which you can then use to create new pages going forward in your project.

Here are a couple of articles which walk you through how to do this: http://msdn.microsoft.com/en-us/library/vstudio/tsyyf0yh.aspx and http://msdn.microsoft.com/en-us/library/vstudio/ms185311.aspx

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top