Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows;
|
---|
6 |
|
---|
7 | namespace 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.