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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

Hello,

Currently I have some issues with the FocusVisualStyle/focus for SciChart elements. Actually, I don’t want the SciChart elements to be focusable (with tab and/or cursor keys) at all. I can disable the tab etc. for the control I placed, but the inner controls of the Chart still seem to be focusable. This especially gets visible when I add a chart modifier to use the cursor keys to move around in theChart. The RenderSurface gets focused and the border of the surface gets changed to a dotted line. A similar behaviour can be seen in the SciChart 4 example 2D Charts > Legends > Chart Legends API. When the tab or cursor keys are used, some element of the Chart gets the focus and gets some dotted border. In this example some inner component, it seems to be part of the legend, gets a border which overlays the entire render surface.

Is there any easy way within SciChart to disable this behaviour or to control the FocusVisualStyle of the inner controls/elements?

Not sure if it’s relevant, but this is on Windows 10.

Version
4.1
  • You must to post comments
0
0

You can use an Expicit style to remove FocusVisualStyle or set Focusable on SciChart controls.

Try adding this code (Taken from Stackoverflow, here) to the SciChartSurface.Resources

<s:SciChartSurface>
    <s:SciChartSurface.Resources>
        <Style TargetType="{x:Type FrameworkElement}">
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
            <Setter Property="s:CompatibleFocus.IsFocusable" Value="False"/>
        </Style>
    </s:SciChartSurface.Resources>
</s:SciChartSurface>

Best regards,
Andrew

  • Steffan Woltjer
    Thanks. I found something similar, but I couldn’t make it work. It turns out that I had to apply this style to s:MainGrid.
  • Andrew
    Ah great, thanks for sharing!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.