quickinfosession background

SyntaxEditor for WPF Forum

Posted 2 years ago by SPF - Appeon
Version: 22.1.3

I set "quickinfo. Content" as "TextBlock" with red background, but the red background does not cover the entire displayed "Session". The effect I want to achieve is that the "TextBlock" background covers the Session.

Or the background color of the session changes according to the theme (in some cases, the background color of the "session" will not change with the theme, and the background color of the "session" opened regardless of the theme is white),

Or I can set the background color of "Session",

Can meet my needs.

Project demonstration:https://github.com/spf-oss/Actiprosoft/blob/main/QuickInfo.rar

[Modified 2 years ago]

Comments (1)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA


Thank you for the sample project.  There is an IntelliPromptQuickInfo element that is created by the session to wrap all content.  It has Padding by default, which allows the white IntelliPromptQuickInfo background of the theme to show through.  Also a TextBlock Background will never cover area outside of the text itself, so it's better to set the Background of our element like this:

public class MyQuickInfoSession : QuickInfoSession {

    protected override IntelliPromptQuickInfo CreatePopupContent() {
        var element = base.CreatePopupContent();
        // NOTE: You could change Padding here too
        element.Background = Brushes.Yellow;
        return element;


Then update your code to:

  1. Use this class instead of the default QuickInfoSession.
  2. Remove your "Background = Brushes.Red" on the TextBlock.

After that, you'll see a Yellow background that fills the whole popup.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.