Customizing Quick Info styles

SyntaxEditor for WPF Forum

Posted 1 year ago by Daisuke Nakada
Version: 18.1.0672
Avatar

Hi,

Could you please tell me how to customize the styles of the Quick Info?

I'd like to change the Quick Info's background color, corner shape, etc.

Thank you.

Comments (2)

Answer - Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

This is effectively the Style you can add to your Application.Resources and modify per your needs:

<Style TargetType="{x:Type editor:IntelliPromptQuickInfo}">
	<Setter Property="Background" Value="{DynamicResource {x:Static themes:AssetResourceKeys.ToolTipBackgroundNormalBrushKey}}" />
	<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:AssetResourceKeys.ToolTipBorderNormalBrushKey}}" />
	<Setter Property="BorderThickness" Value="{DynamicResource {x:Static themes:AssetResourceKeys.ToolTipBorderNormalThicknessKey}}" />
	<Setter Property="Foreground" Value="{DynamicResource {x:Static themes:AssetResourceKeys.ToolTipForegroundNormalBrushKey}}" />
		
	<Setter Property="FontSize" Value="12" />
	<Setter Property="Padding" Value="{DynamicResource {x:Static themes:AssetResourceKeys.ToolTipPaddingNormalThicknessKey}}" />

	<Setter Property="themes:ThemeProperties.CornerRadius" Value="{DynamicResource {x:Static themes:AssetResourceKeys.ToolTipBorderNormalCornerRadiusKey}}" />
		
	<Setter Property="Template">
		<Setter.Value>
			<ControlTemplate TargetType="{x:Type editor:IntelliPromptQuickInfo}">

				<Border Background="{TemplateBinding Background}"
						BorderBrush="{TemplateBinding BorderBrush}"
						BorderThickness="{TemplateBinding BorderThickness}"
						Padding="{TemplateBinding Padding}"
						CornerRadius="{TemplateBinding themes:ThemeProperties.CornerRadius}"
						SnapsToDevicePixels="True">

					<shared:PixelSnapper>
						<ContentPresenter Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Session.Content}" />
					</shared:PixelSnapper>

				</Border>

			</ControlTemplate>
		</Setter.Value>
	</Setter>
</Style>


Actipro Software Support

Posted 1 year ago by Daisuke Nakada
Avatar

Thank you for your help!

The latest build of this product (v2019.1 build 0683) 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.