Hello,
I also have WindowWPF classes (WPFPage1, WPFPage2).
When I click AddWPF1 button I want an instance of the WPFPage1 with some details (WPFPage2 WPFPage, string formType, string contentname1, string textboxtext, string labelContent) to open in Grid1. And similar with the AddWPF2 button.
At present I can only use WPFPage1 or WPFPage2 (by changing the WPFPage1 or WPFPage2 in this line public void addFormToGrid(WPFPage1 WPFPage, string formType, string contentname1, string textboxtext, string labelContent).
I have attached a full working example with code with WFPPage2 button commented out so that it works.
Still getting my head around OOP so could someone please show me where I’m going wrong here.
Tony.
Attachment: ObjectTest.zip