private void LoadAddLocalSellerFieldsAndCollections() { SYLMap.RemoveMarkerTemp(); SYLMap.RemoveAllMarkers(); var productTypes = Enum.GetValues(typeof(ProductType)); foreach (Enum productType in productTypes) { // Adding elements to combobox ComboBoxProductType.Items.Add(productType); // Create first textBox and button and add to the secondary stack panel var stackPanel = CreateStackPanelForProductTypes(productType); var textBox = CreateTextFieldForProductTypes(); var listTextBoxes = new List <TextBox>(); listTextBoxes.Add(textBox); dictionaryOfTextBoxListAddProduct.Add((ProductType)productType, listTextBoxes); stackPanel.Children.Add((dictionaryOfTextBoxListAddProduct[(ProductType)productType])[^ 1]);