//creates the side panel for the airport size and zooming private StackPanel createAirportSizeSidePanel() { StackPanel sidePanel = new StackPanel(); sidePanel.Margin = new Thickness(5, 0, 0, 0); foreach (GeneralHelpers.Size size in Enum.GetValues(typeof(GeneralHelpers.Size))) { WrapPanel panelSize = new WrapPanel(); panelSize.Margin = new Thickness(0, 5, 0, 5); Ellipse eSize = new Ellipse(); eSize.Width = 20; eSize.Height = 20; eSize.StrokeThickness = 2; eSize.Stroke = Brushes.Black; eSize.Fill = getSizeColor(size); panelSize.Children.Add(eSize); TextBlock txtSize = new TextBlock(); txtSize.Text = new TextUnderscoreConverter().Convert(size).ToString(); txtSize.Margin = new Thickness(5, 0, 0, 0); panelSize.Children.Add(txtSize); sidePanel.Children.Add(panelSize); } StackPanel panelZoom = new StackPanel(); panelZoom.Margin = new Thickness(0, 10, 0, 0); TextBlock txtMapHeader = UIHelpers.CreateTextBlock(Translator.GetInstance().GetString("PopUpMap", "1000")); txtMapHeader.FontWeight = FontWeights.Bold; txtMapHeader.FontSize = 14; txtMapHeader.TextDecorations = TextDecorations.Underline; panelZoom.Children.Add(txtMapHeader); panelZoom.Children.Add(UIHelpers.CreateTextBlock(Translator.GetInstance().GetString("PopUpMap", "1001"))); panelZoom.Children.Add(UIHelpers.CreateTextBlock(Translator.GetInstance().GetString("PopUpMap", "1002"))); panelZoom.Children.Add(UIHelpers.CreateTextBlock(Translator.GetInstance().GetString("PopUpMap", "1003"))); panelZoom.Children.Add(UIHelpers.CreateTextBlock(Translator.GetInstance().GetString("PopUpMap", "1004"))); panelZoom.Children.Add(UIHelpers.CreateTextBlock(Translator.GetInstance().GetString("PopUpMap", "1005"))); sidePanel.Children.Add(panelZoom); //var regions = airports.Select(a => a.Profile.Country.Region).Distinct();//from a in airports select a.Profile.Country.Region; WrapPanel panelZoomButtons = new WrapPanel(); Button btnZoomIn = new Button(); btnZoomIn.SetResourceReference(Button.StyleProperty, "StandardButtonStyle"); //btnZoomIn.Height = Double.NaN; btnZoomIn.Width = 30; btnZoomIn.Content = "+"; btnZoomIn.Click += btnZoomIn_Click; // btnZoomIn.SetResourceReference(Button.BackgroundProperty, "ButtonBrush"); panelZoomButtons.Children.Add(btnZoomIn); Button btnZoomOut = new Button(); btnZoomOut.SetResourceReference(Button.StyleProperty, "StandardButtonStyle"); //btnZoomOut.Height = Double.NaN; btnZoomOut.Width = 30; btnZoomOut.Content = "-"; btnZoomOut.Margin = new Thickness(5, 0, 0, 0); // btnZoomOut.SetResourceReference(Button.BackgroundProperty, "ButtonBrush"); btnZoomOut.Click += btnZoomOut_Click; panelZoomButtons.Children.Add(btnZoomOut); sidePanel.Children.Add(panelZoomButtons); return(sidePanel); }