Exemple #1
0
        public void UpdateViewPortRect()
        {
            // calc the view port window
            viewPort = new Rect(0, 0, ActualWidth, ActualHeight);
            viewPort = RenderTransform.TransformBounds(viewPort);

            Point topLeft     = RenderTransform.Inverse.Transform(new Point(0, 0));
            Point bottomRight = RenderTransform.Inverse.Transform(new Point(ActualWidth, ActualHeight));

            Rect r = new Rect(topLeft, bottomRight);

            viewPort = r;
        }