Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Charts/Legend items/LegendStyles.cs @ 12503

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

#2283 added GUI and charts; fixed MCTS

File size: 1.0 KB
RevLine 
[12503]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows;
6
7namespace Microsoft.Research.DynamicDataDisplay.Charts
8{
9  public static class LegendStyles
10  {
11    private static Style defaultStyle;
12    public static Style Default
13    {
14      get
15      {
16        if (defaultStyle == null)
17        {
18          var legendStyles = GetLegendStyles();
19          defaultStyle = (Style)legendStyles[typeof(Legend)];
20        }
21
22        return defaultStyle;
23      }
24    }
25
26    private static Style noScrollStyle;
27    public static Style NoScroll
28    {
29      get
30      {
31        if (noScrollStyle == null)
32        {
33          var legendStyles = GetLegendStyles();
34          noScrollStyle = (Style)legendStyles["NoScrollLegendStyle"];
35        }
36
37        return noScrollStyle;
38      }
39    }
40
41    private static ResourceDictionary GetLegendStyles()
42    {
43      var legendStyles = (ResourceDictionary)Application.LoadComponent(new Uri("/DynamicDataDisplay;component/Charts/Legend items/LegendResources.xaml", UriKind.Relative));
44      return legendStyles;
45    }
46  }
47}
Note: See TracBrowser for help on using the repository browser.