Hi
I have extended the WPF Page control and created a control named CPage. The objective is to include some custom functionality in the Page control, including some dependency properties which must be edited in the VS Properties window.
The question is , after creating the CPage control, how to add the CPage control into a WPF app, so as to use it.
In Windows Forms, if Form was extended to a class named, say, CForm, it was possible in VS, to export the Cform class from the assembly where it was defined, using the VS command “File > Export template”. Then in a new Windows Forms app, by using the VS “Project > Add new item” command, it was possible to add an instance of the new custom Form to the App.
I have tried this approach in WPF also. However, when the CPage class is added to a WPF app, it gets added as a Page instance rather than a CPage instance. Therefore, the custom dependency property doesn’t appear in the VS Properties window for editing.
What is the right approach in this regard for a WPF App ?
Thanks.
Steven