How to hide “no items” of CompletionSession?

SyntaxEditor for WPF Forum

Posted 7 months ago by Mana Abe
Version: 24.1.3
Avatar

When using CompletionSession, adding an item to a session (session.Items.Add()) may cause the session to display “no items”.

I do not want “no items” to be displayed.
Can I control whether “no items” is displayed or not?
I would like to know how to force the session to hide “no items” even in situations where it is displayed.

Thank you in advance,

Comments (4)

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

You can alter the appearance of the "no items" UI.  The IntelliPromptCompletionList primitive control has a NoItemsTemplate property that is currently set this way:

<Setter Property="NoItemsTemplate">
	<Setter.Value>
		<DataTemplate>

			<Border Background="{DynamicResource {x:Static themes:AssetResourceKeys.ListBackgroundNormalBrushKey}}" Padding="4,1">
				<TextBlock Text="{productsEditor:SRExtension UIIntelliPromptCompletionListNoItemsText}" FontStyle="Italic"
							Foreground="{DynamicResource {x:Static themes:AssetResourceKeys.ContainerForegroundLowDisabledBrushKey}}" VerticalAlignment="Center" />
			</Border>
										
		</DataTemplate>
	</Setter.Value>
</Setter>

You could make an implicit Style in your Application.Resources that targets IntelliPromptCompletionList and updates that NoItemsTemplate to something else.


Actipro Software Support

Posted 7 months ago by Mana Abe
Avatar
Hello,
Thank you for your support!
I understood how to change the contents of the “no items” UI.
I would like to hide the CompletionSession window when there are no items.
Is it possible?
Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Unfortunately we don't have anything to hide the completion list altogether when there are no items.


Actipro Software Support

Posted 7 months ago by Mana Abe
Avatar

I understand.

Thank you for your support!

The latest build of this product (v24.1.5) 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.