public ColourBar(ColourMap colourMap) { InitializeComponent(); this.colourMap = colourMap; colourBarPanel = new ColourBarPanel(); image = new FalseColourImage(new Rect(0, Min, 1, Max), MathHelper.Counter(1, colourMap.Length), false); colourBarPanel.plotItems.Add(image); image.ColourMap = colourMap; colourBarPanel.Margin = new Thickness(0, 0, 5, 0); this.grid.Children.Add(colourBarPanel); colourMapUpdateTimer = new DispatcherTimer(); colourMapUpdateTimer.Interval = new TimeSpan(1000); // 1/10 s colourMapUpdateTimer.Tick += OnColourMapUpdateTimerElapsed; AddSliders(); AddContextMenu(); FocusVisualStyle = null; }