1
Answer

Window-to-Page inheritance C#, XAML, WPF

Ibuomi Abibo

Ibuomi Abibo

13y
4.7k
1
Hi, 

I have a window (Window1) with a ListBox (list1) bound to an xml file and a button that calls another page (Page1). Page1 implements methods to append to or alter the xml file however the control list1 is not recognized on Page1. So far I have referenced Window1 in the xaml file of Page1 as such:

xmlns:local="clr-namespace:RecipeApp"

I have also tried to reference Window1 on Page1 as such

public partial class Page1 : namespace.Window1{} 

but I get an error stating that "Partial declarations must not specify different base classes". My objective is to utilize the controls of Window1 on Page1 through referencing or by Window-to-Page inheritance. Any ideas would be helpful. 

Thanks.
 


Thanks
Answers (1)