How can I use an object from a WPF page to an other WPF page?
ProductBactlog Page
public partial class ProductBacklog : Page { ProductLogCollection productLogCollection = new ProductLogCollection(); public ProductBacklog() { InitializeComponent(); } public string getCounts() { return productLogCollection.Count().ToString(); } }
SprintBacklog page
public partial class SprintBackLog : Page { private ProductBacklog parent; public SprintBackLog(ProductBacklog parent) { InitializeComponent(); this.parent = parent; textBlockError.Text = "Counts: " + parent.getCounts(); }
I get this Error: XamlParseExeption occurred
No matching constructor found on type 'Projektstyring.SprintBackLog'. You can use the Arguments or FactoryMethod directives to construct this type.