Provider expander in the IContentProvider

SyntaxEditor for WPF Forum

Posted 2 years ago by Josh
Version: 17.2.0
Avatar

Hello,

I'm using custom content in the quickinfo and ParameterProvider to provide simple syntax and a description.

However, I would like an option in this content to provide some sort of Advanced expander, where they can click the advanced expander, and the full grammer for the statement could appear.

In the GetContent() function, I've done this so far and the expander appears, but doesn't actually expand.

var grid = new Grid();
grid.RowDefinitions.Add(new RowDefinition());
grid.RowDefinitions.Add(new RowDefinition());

var htmlContent = new ContentProvider(htmlSnippet.ToString()).GetContent() as UIElement;
grid.Children.Add(htmlContent);
Grid.SetRow(htmlContent, 0);
var expander = new Expander();
var stackPanel = new StackPanel();
stackPanel.Children.Add(new TextBlock() { Text = "my super sweet full description here." });
expander.Content = stackPanel;
expander.Header = "Advanced";
Grid.SetRow(expander, 1);
grid.Children.Add(expander);

return grid;

Any suggestions to make this work or any other way to provide advanced information to the user without using the signatures?

[Modified 2 years ago]

Comments (1)

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

Hi Josh,

In our Sample Browser I updated the "ProductSamples/SyntaxEditorSamples/QuickStart/GettingStarted09/FunctionContentProvider" to include your sample code. That class is used as the content provider for several of the samples. I essentially commented out the line that returned the HtmlContentProvider's content and inserted your code there (along with the necessary "using" statements).

I then ran the "Getting Started 9 - IntelliPrompt QuickInfo" QuickStart. The expander appears in the default, collapsed state. Since you can't interact with QuickInfo popups (they disappear when you try to mouse over them), that was the extent of testing there.

Next I ran the "Getting Started 11 - IntelliPrompt Parameter Info" QuickStart. After typing the "(" character to display the ParameterInfo (as prompted by the same), I was able to see the expander in the popup. I was also able to click on the expander and the popup grew in height to show the additional content after it was expanded.

Perhaps in your effort to clean up the sample code for this forum post you also removed whatever was causing your own code to not expand? Please let me know If I have misunderstood the issue you are describing, but it appears to be working as expected.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.