public SerumLabel(string title, string cptCode) { PageContent pageContent = new PageContent(); FixedPage fixedPage = new FixedPage(); StackPanel rowPanel = new StackPanel(); rowPanel.Orientation = Orientation.Horizontal; rowPanel.Margin = new Thickness(5); SerumLabelPanel panel1 = new SerumLabelPanel(title, cptCode); SerumLabelPanel panel2 = new SerumLabelPanel(title, cptCode); SerumLabelPanel panel3 = new SerumLabelPanel(title, cptCode); SerumLabelPanel panel4 = new SerumLabelPanel(title, cptCode); rowPanel.Children.Add(panel1); rowPanel.Children.Add(panel2); rowPanel.Children.Add(panel3); rowPanel.Children.Add(panel4); fixedPage.Children.Add(rowPanel); ((System.Windows.Markup.IAddChild)pageContent).AddChild(fixedPage); this.Pages.Add(pageContent); }