Exemplo n.º 1
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            plotterAreaBackground = this.Template.FindName("PART_PlotterAreaBackground", this) as PlotterAreaBackground;
            axesGrid              = this.Template.FindName("PART_AxesGrid", this) as Grid;
            plotterAreaBorder     = this.Template.FindName("PART_PlotAreaBorder", this) as PlotterAreaBorder;
            horizAxesContainer    = this.Template.FindName("PART_XAxesContainer", this) as HorizAxesContainer;
            verticalAxesContainer = this.Template.FindName("PART_YAxesContainer", this) as VerticalAxesContainer;
            plotterArea           = this.Template.FindName("PART_PlotterArea", this) as PlotterArea;

            plotterSize = new Size(1, 1);
            if (plotterArea != null)
            {
                plotterArea.PlotterAreaSizeChangedEvent += plotterArea_PlotterAreaSizeChangedEvent;
            }
        }
Exemplo n.º 2
0
        private void UpdatePlotAreaBorder(DependencyObject host)
        {
            PlotterAreaBorder plotAreaBorder = host as PlotterAreaBorder;

            if (plotAreaBorder != null)
            {
                plotAreaBorder.Update();
            }
            if (host != null)
            {
                for (int i = 0; i < VisualTreeHelper.GetChildrenCount(host); ++i)
                {
                    DependencyObject item = VisualTreeHelper.GetChild(host, i);
                    UpdateAxisGrid(item);
                }
            }
        }