In the below xaml code the IsTabStop is set to false for the chart and series, but when tab key is pressed the tab navigation is still allowed on the chart and the series.
<ig:XamDataChart Background="White" Name="xamDataChart1" IsTabStop="False"> <ig:XamDataChart.Series> <ig:SplineSeries ValueMemberPath="Value" IsTabStop="False" x:Name="Series2" ItemsSource="{Binding Data2}" XAxis="{Binding ElementName=firstXAxis}" YAxis="{Binding ElementName=theYAxis}" /> <ig:SplineSeries ValueMemberPath="Value" IsTabStop="False" x:Name="Series1" ItemsSource="{Binding Data}" XAxis="{Binding ElementName=firstXAxis}" YAxis="{Binding ElementName=theYAxis}" /> </ig:XamDataChart.Series> </ig:XamDataChart>
Is there a way to handle the taborder index for the chart and series considering the option that the data for the series is fetched from database and binded in the codebehind?
Option to disable the tab navigation from code behind when not required?
e.g. xamDataChart1.IsTabStop = false; Series1.IsTabStop = false;Series2.IsTabStop = false;
Hello Prasad,
I am just checking your progress on the issue. Please do not hesitate to let me know if you have any further questions on the matter.
After contacting our development team this issue has been determined as ‘Not a bug’. In order to stop the keyboard navigation for the xamDataChart the KeyboardNavigation.TabNavigation property to ‘None’. I have modified the last attached sample with this functionality for you.
Please refer to the attached sample application and feel free to let me know if you have any further questions on the matter.
I have logged this behavior with our developers in our tracking system, with an issue ID of 136343. I have also created a support ticket on your behalf with number CAS-112134-W8X3R2 in order to link the development issue to it so that you are automatically updated when a Service Release containing your fix is available for download.
Hello Gergana,
How can I completely disable the TabNavigation on the ChartControl at one instance rather than setting this at each level like CategoryX and NumericY and then setting the markers of the series?
Thanks and Regards,
Prasad
Thanks for your response and the sample was very helpful.The above solution works and below is the modified code. I need few more clarifications on this.
private void BindLineSeriesData() { LineSeries series; List<LineSeries> serieCollection =new List<LineSeries>(); this.myChartControl.DataChart = new XamDataChart(); this.myChartControl.DataChart.Padding = new Thickness(10.0); this.myChartControl.DataChart.VerticalZoomable = true; this.myChartControl.DataChart.HorizontalZoomable = true; this.myChartControl.DataChart.HorizontalAlignment = HorizontalAlignment.Stretch; this.myChartControl.DataChart.VerticalAlignment = VerticalAlignment.Stretch; this.myChartControl.DataChart.VerticalZoombarVisibility = Visibility.Visible; this.myChartControl.DataChart.HorizontalZoombarVisibility = Visibility.Visible; this.myChartControl.DataChart.Opacity = Convert.ToDouble(txtOpacity.Text); this.myChartControl.IsTabStop = false; this.myChartControl.DataChart.IsTabStop = false; ChartData dataSample = GetChartDataList();
NumericYAxis nyAxis = new NumericYAxis(); CategoryXAxis cxAxis = new CategoryXAxis();
Style mstyle = new Style { TargetType = typeof(Marker) }; mstyle.Setters.Add(new Setter(Marker.IsTabStopProperty, false)); nyAxis.MinimumValue = 0; nyAxis.Interval = 200; cxAxis.ItemsSource = dataSample; cxAxis.Label = "{Country}"; nyAxis.IsTabStop = false; cxAxis.IsTabStop = false;
this.myChartControl.DataChart.Axes.Add(cxAxis); this.myChartControl.DataChart.Axes.Add(nyAxis);
series = new LineSeries(); series.ValueMemberPath = "Coal"; series.Title = "Coal"; series.XAxis = cxAxis; series.YAxis = nyAxis; series.MarkerStyle = mstyle; series.Legend = myChartControl.legend; series.ToolTip = myChartControl.ShowToolTip("Item.Coal", "Coal"); series.ItemsSource = dataSample; serieCollection.Add(series);
series = new LineSeries(); series.ValueMemberPath = "Oil"; series.Title = "Oil"; series.XAxis = cxAxis; series.YAxis = nyAxis; series.MarkerStyle = mstyle; series.Legend = myChartControl.legend; series.ToolTip = myChartControl.ShowToolTip("Item.Oil", "Oil"); series.ItemsSource = dataSample; serieCollection.Add(series);
series = new LineSeries(); series.ValueMemberPath = "Gas"; series.Title = "Gas"; series.XAxis = cxAxis; series.YAxis = nyAxis; series.MarkerStyle = mstyle; series.Legend = myChartControl.legend; series.ToolTip = myChartControl.ShowToolTip("Item.Gas", "Gas"); series.ItemsSource = dataSample; serieCollection.Add(series);
this.myChartControl.ShowChart<LineSeries>(serieCollection); }
I have the following issues:1. Is there a way to set the IsTabStop to false for the Vertical and Horizontal zoombar as the tab navigation is still allowed on the zoom bars.2. The Legend items within the legend also allow the tab navigation.Settings series.Legend.IsTabStop=false; doesnot work.
I have the ContentControl with a Grid containing the XamDataChart in the Usercontrol.
As a temporary solution setting the contentcontrol istabstop to false will not allow the tab navigation within the legend items, but I'm not quite happy with this solution. Is there any direct solution to set IsTabStop on legend similar to the MarkerStyle set on series.<ContentControl.Resources> <Style TargetType="ContentControl"> <Setter Property="IsTabStop" Value="false"/> </Style></ContentControl.Resources>