Esempio n. 1
0
        private void RefreshScaleText(Size actualSize)
        {
            var viewRect    = new Rect(new Point(), actualSize);
            var centerPoint = new Point(viewRect.Width / 2.0, viewRect.Height / 2.0);
            var scale       = Scale * Math.Min(centerPoint.X, centerPoint.Y);

            var textBrush  = (Brush)FindResource("SystemMapScaleTextBrush");
            var scaleWidth = (double)FindResource("SystemMapScaleWidth");

            m_scaleText = new FormattedText(FormatUtility.RenderDistance(scaleWidth / scale), CultureInfo.CurrentUICulture, FlowDirection.LeftToRight, new Typeface("Verdana"), 12, textBrush, 1.0);
        }