private void ShowLegend() { this.legend1 = new DotSpatial.Controls.Legend(); // // legend1 // this.legend1.BackColor = System.Drawing.Color.White; this.legend1.ControlRectangle = new System.Drawing.Rectangle(0, 0, 176, 128); this.legend1.DocumentRectangle = new System.Drawing.Rectangle(0, 0, 34, 114); this.legend1.HorizontalScrollEnabled = true; this.legend1.Indentation = 30; this.legend1.IsInitialized = false; this.legend1.Location = new System.Drawing.Point(217, 12); this.legend1.MinimumSize = new System.Drawing.Size(5, 5); this.legend1.Name = "legend1"; this.legend1.ProgressHandler = null; this.legend1.ResetOnResize = false; this.legend1.SelectionFontColor = System.Drawing.Color.Black; this.legend1.SelectionHighlight = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(238)))), ((int)(((byte)(252))))); this.legend1.Size = new System.Drawing.Size(176, 128); this.legend1.TabIndex = 0; this.legend1.Text = "Legend"; this.legend1.VerticalScrollEnabled = true; App.Map.Legend = legend1; App.Legend = this.legend1; App.DockManager.Add(new DockablePanel("kLegend", "Legend", legend1, DockStyle.Left) { SmallImage = Properties.Resources.legend_16x16 }); }
public override void Activate() { base.Activate(); // Add legend var legend = new Legend{Text = "Legend"}; App.Legend = legend; App.DockManager.Add(new DockablePanel("kLegend", "Legend", legend, DockStyle.Left)); // Add map var map = new Map {Text = "Map", Legend = App.Legend}; App.Map = map; App.DockManager.Add(new DockablePanel("kMap", "Map", map, DockStyle.Fill)); }
public void SpatialMapLegendLoaded(Legend legend) { if (spatialMaplegend == null) { spatialMaplegend = legend; if (spatialMap != null) { spatialMap.Legend = spatialMaplegend; } } }