Exemplo n.º 1
0
        private FrameworkElement GetContent(QuickInfoModel model)
        {
            if (model.Markup.Tokens.Length == 0)
            {
                return(null);
            }

            var glyph      = GetGlyph(model.Glyph);
            var textBlock  = GetTextBlock(model.Markup);
            var stackPanel = new StackPanel();

            stackPanel.Orientation = Orientation.Horizontal;
            stackPanel.Children.Add(glyph);
            stackPanel.Children.Add(textBlock);

            var container = new QuickInfoDisplayPanel();

            SetTextProperties(container, _tooltipClassificationFormatMap.DefaultTextProperties, true);
            container.Orientation = Orientation.Vertical;
            container.Children.Add(stackPanel);

            if (!string.IsNullOrEmpty(model.Documentation))
            {
                container.Children.Add(new TextBlock
                {
                    Text   = model.Documentation,
                    Margin = new Thickness(0, 3, 0, 0)
                });
            }

            return(container);
        }
Exemplo n.º 2
0
        private FrameworkElement GetContent(QuickInfoModel model)
        {
            if (model.Markup.Tokens.Length == 0)
                return null;

            var glyph = GetGlyph(model.Glyph);
            var textBlock = GetTextBlock(model.Markup);
            var stackPanel = new StackPanel();
            stackPanel.Orientation = Orientation.Horizontal;
            stackPanel.Children.Add(glyph);
            stackPanel.Children.Add(textBlock);

            var container = new QuickInfoDisplayPanel();
            SetTextProperties(container, _tooltipClassificationFormatMap.DefaultTextProperties, true);
            container.Orientation = Orientation.Vertical;
            container.Children.Add(stackPanel);

            if (!string.IsNullOrEmpty(model.Documentation))
                container.Children.Add(new TextBlock
                {
                    Text = model.Documentation,
                    Margin = new Thickness(0, 3, 0, 0)
                });

            return container;
        }