Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Charts/Navigation/NavigationBase.cs @ 13398

Last change on this file since 13398 was 12503, checked in by aballeit, 10 years ago

#2283 added GUI and charts; fixed MCTS

File size: 888 bytes
Line 
1using System.Windows;
2using System.Windows.Media;
3
4namespace Microsoft.Research.DynamicDataDisplay.Navigation
5{
6  /// <summary>Base class for all navigation providers</summary>
7  public abstract class NavigationBase : ViewportElement2D
8  {
9    protected NavigationBase()
10    {
11      ManualTranslate = true;
12      ManualClip = true;
13      Loaded += NavigationBase_Loaded;
14    }
15
16    private void NavigationBase_Loaded(object sender, RoutedEventArgs e)
17    {
18      OnLoaded(e);
19    }
20
21    protected virtual void OnLoaded(RoutedEventArgs e)
22    {
23      // this call enables contextMenu to be shown after loading and
24      // before any changes to Viewport - without this call
25      // context menu was not shown.
26      InvalidateVisual();
27    }
28
29    protected override void OnRenderCore(DrawingContext dc, RenderState state)
30    {
31      dc.DrawRectangle(Brushes.Transparent, null, state.Output);
32    }
33  }
34}
Note: See TracBrowser for help on using the repository browser.