Esempio n. 1
0
 public override void OnApplyTemplate()
 {
     base.OnApplyTemplate();
     if (this.PART_ItemsControl != null)
     {
         this.PART_ItemsControl.ItemTemplateApplied -= PART_ItemsControl_ItemPointGenerated;
     }
     this.PART_ItemsControl = (ItemsControlEx)GetTemplateChild(sPART_DataPointItemsControl);
     this.PART_ItemsControl.ItemTemplateApplied += PART_ItemsControl_ItemPointGenerated;
 }
Esempio n. 2
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            if (this.PART_HorizontalGridLineItemsControl != null)
            {
                this.PART_HorizontalGridLineItemsControl.ItemTemplateApplied -= HorizontalGridLineItemTemplateApplied;
            }

            if (this.PART_VerticalGridLineItemsControl != null)
            {
                this.PART_VerticalGridLineItemsControl.ItemTemplateApplied += VerticalGridLineItemTemplateApplied;
            }

            if (this.PART_SeriesItemsControl != null)
            {
                this.PART_SeriesItemsControl.ItemTemplateApplied -= SeriesItemTemplateApplied;
            }

            this.PART_SeriesItemsControl = (ItemsControlEx)GetTemplateChild(sPART_SeriesItemsControl);
            this.PART_SeriesItemsControl.ItemTemplateApplied += SeriesItemTemplateApplied;

            this.PART_HorizontalGridLineItemsControl             = (ItemsControlEx)GetTemplateChild(sPART_HorizontalGridLineItemsControl);
            this.PART_VerticalGridLineItemsControl               = (ItemsControlEx)GetTemplateChild(sPART_VerticalGridLineItemsControl);
            this.PART_HorizontalGridLineItemsControl.ItemsSource = this.HorizontalGridLineOffsets;
            this.PART_VerticalGridLineItemsControl.ItemsSource   = this.VerticalGridLineOffsets;

            this.PART_HorizontalGridLineItemsControl.ItemTemplateApplied += HorizontalGridLineItemTemplateApplied;
            this.PART_VerticalGridLineItemsControl.ItemTemplateApplied   += VerticalGridLineItemTemplateApplied;

            this.PART_Root         = (Grid)GetTemplateChild(sPART_Root);
            this.PART_PlotAreaRoot = (Grid)GetTemplateChild(sPART_PlotAreaRoot);
            OnXAxisPropertyChanged(null, this.XAxis);
            OnYAxisPropertyChanged(null, this.YAxis);
            OnPlotAreaBackgroundPropertyChanged(null, this.PlotAreaBackground);

            this.PART_HorizontalCrossHair = (Line)GetTemplateChild(sPART_HorizontalCrossHair);
            this.PART_VerticalCrossHair   = (Line)GetTemplateChild(sPART_VerticalCrossHair);

            this.PART_PlotAreaRoot.MouseMove  += PART_PlotAreaRoot_MouseMove;
            this.PART_PlotAreaRoot.MouseLeave += PART_PlotAreaRoot_MouseLeave;
        }