Пример #1
0
		public static NewLegendItem BuildDefaultLegendItem(IPlotterElement chart)
		{
			DependencyObject dependencyChart = (DependencyObject)chart;

			NewLegendItem result = new NewLegendItem();
			SetCommonBindings(result, chart);
			return result;
		}
Пример #2
0
        public static NewLegendItem BuildDefaultLegendItem(IPlotterElement chart)
        {
            DependencyObject dependencyChart = (DependencyObject)chart;

            NewLegendItem result = new NewLegendItem();

            SetCommonBindings(result, chart);
            return(result);
        }
Пример #3
0
 public static void SetCommonBindings(NewLegendItem legendItem, object chart)
 {
     legendItem.DataContext = chart;
     legendItem.SetBinding(NewLegend.VisualContentProperty, new Binding {
         Path = new PropertyPath("(0)", NewLegend.VisualContentProperty)
     });
     legendItem.SetBinding(NewLegend.DescriptionProperty, new Binding {
         Path = new PropertyPath("(0)", NewLegend.DescriptionProperty)
     });
 }
Пример #4
0
		public static void SetCommonBindings(NewLegendItem legendItem, object chart)
		{
			legendItem.DataContext = chart;
			legendItem.SetBinding(NewLegend.VisualContentProperty, new Binding { Path = new PropertyPath("(0)", NewLegend.VisualContentProperty) });
			legendItem.SetBinding(NewLegend.DescriptionProperty, new Binding { Path = new PropertyPath("(0)", NewLegend.DescriptionProperty) });
		}