Microsoft.VisualStudio.R.Package.DataInspect.HeaderTextVisual.GetRenderSize C# (CSharp) Méthode

GetRenderSize() protected méthode

Calculates column header render size taking into account optional sorting arrow, if any.
protected GetRenderSize ( System.Windows.Media.FormattedText formattedText, double &offset ) : Size
formattedText System.Windows.Media.FormattedText
offset double
Résultat System.Windows.Size
        protected override Size GetRenderSize(FormattedText formattedText, out double offset) {
            var baseSize = base.GetRenderSize(formattedText, out offset);

            var currentArrowGlyph = new FormattedText(_arrowChar.ToString(), CultureInfo.CurrentUICulture,
                                               FlowDirection.LeftToRight, Typeface, FontSize, Foreground);
            var largestArrowGlyph = new FormattedText(ArrowUp.ToString(), CultureInfo.CurrentUICulture,
                                               FlowDirection.LeftToRight, Typeface, FontSize, Foreground);

            offset = largestArrowGlyph.Width;
            return new Size(baseSize.Width - currentArrowGlyph.Width + 2* largestArrowGlyph.Width, baseSize.Height);
        }