Exemple #1
0
        /// <summary>
        /// Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.
        /// </summary>
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }

            this.plotImage = (PlotImage)this.GetTemplateChild(PartPlotImage);

            this.zoomRectangle = new ContentControl();
            this.plotImage.Overlay.Children.Add(this.zoomRectangle);
        }
Exemple #2
0
        /// <summary>
        /// Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.
        /// </summary>
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }

            this.plotImage = this.GetTemplateChild(PartPlotImage) as PlotImage;

            this.zoomRectangle = new ContentControl();
            this.plotImage.Overlay.Children.Add(this.zoomRectangle);
        }