SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0
0

Hi

I want to change to font name & font size for all modifier tooltips (CursrorModifier, RolloverModifier and so on )

I discovered that all tooltips use TextBlocks with style HintDataItemsStyle. This is its definition:

  <!--  Label used in cursors  -->
  <Style x:Key="HintDataItemsStyle" TargetType="TextBlock">
      <Setter Property="apc:RelativeSourceBinding.AncestorType" Value="r:TemplatableControl"/>
      <Setter Property="Foreground" Value="{Binding Path=(apc:RelativeSourceBinding.Ancestor).Foreground, RelativeSource={RelativeSource Self}}" />
      <Setter Property="FontWeight" Value="{Binding Path=(apc:RelativeSourceBinding.Ancestor).FontWeight, RelativeSource={RelativeSource Self}}" />
      <Setter Property="FontFamily" Value="{Binding Path=(apc:RelativeSourceBinding.Ancestor).FontFamily, RelativeSource={RelativeSource Self}}" />
      <Setter Property="FontSize" Value="{Binding Path=(apc:RelativeSourceBinding.Ancestor).FontSize, RelativeSource={RelativeSource Self}}" />
      <Setter Property="Margin" Value="{Binding Path=(apc:RelativeSourceBinding.Ancestor).Margin, RelativeSource={RelativeSource Self}}" />
  </Style>

So, I feel this would be easy to change font parameters just setting them to some parent (due to RelativeSourceBinding.Ancestor binding). But I cannot figure out which. I tried to change font size for series, for axes and even for surface – no result.

Version
5.2.1.11792
  • Andrew
    Hi Vlad, Your support is showing as expired on our system (if this is a mistake, please let me know). Best regards, Andrew
  • You must to post comments
0
0

Hi Vlad,

Thanks for your question. It is bound to a TooltipControl control, which is actually a control that holds toolip content. This control, in turn, gets its default values from Themes.

So you can either provide an implicit style for TooltipControl or override relevant default colors in the applied Theme:
https://www.scichart.com/documentation/v5.x/webframe.html#Overriding%20Colors%20of%20our%20Themes.html

Please let me know if this helps,

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+