示例#1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\..\RuntimeChart.xaml"
                ((CoreTest.RuntimeChart)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 8 "..\..\..\RuntimeChart.xaml"
                ((CoreTest.RuntimeChart)(target)).Closed += new System.EventHandler(this.Window_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.comb1 = ((System.Windows.Controls.ComboBox)(target));

            #line 16 "..\..\..\RuntimeChart.xaml"
                this.comb1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comb1_SelectionChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.colorpicker = ((Microsoft.Windows.Controls.ColorPicker)(target));

            #line 18 "..\..\..\RuntimeChart.xaml"
                this.colorpicker.SelectedColorChanged += new System.Windows.RoutedPropertyChangedEventHandler <System.Windows.Media.Color>(this.ColorPicker_SelectedColorChanged);

            #line default
            #line hidden
                return;

            case 4:
                this.chartPlotter1 = ((Microsoft.Research.DynamicDataDisplay.ChartPlotter)(target));
                return;

            case 5:
                this.hTimeSpanAxis = ((Microsoft.Research.DynamicDataDisplay.Charts.HorizontalDateTimeAxis)(target));
                return;

            case 6:
                this.hilevel = ((Microsoft.Research.DynamicDataDisplay.Charts.HorizontalLine)(target));
                return;

            case 7:
                this.lolevel = ((Microsoft.Research.DynamicDataDisplay.Charts.HorizontalLine)(target));
                return;
            }
            this._contentLoaded = true;
        }
		public void TestAddingToPlotter()
		{
			HorizontalLine line = new HorizontalLine { Value = 0.2 };
			ChartPlotter plotter = new ChartPlotter();
			plotter.Children.Add(line);

			VerticalLine line2 = new VerticalLine { Value = 0.1 };
			plotter.Children.Add(line2);

			VerticalRange range = new VerticalRange { Value1 = 0.1, Value2 = 0.3 };
			plotter.Children.Add(range);

			RectangleHighlight rect = new RectangleHighlight { Bounds = new Rect(0, 0, 1, 1) };
			plotter.Children.Add(rect);
		}