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.
- _ _ asked 7 years ago
- last edited 7 years ago
- You must login to post comments
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
- Andrew Burnett-Thompson answered 7 years ago
- last edited 7 years ago
-
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.
-
Ah great, thanks for sharing!
- You must login to post comments
Please login first to submit.