This question is locked. New answers and comments are not allowed.
I has been reading http://www.telerik.com/help/windows-8-xaml/radchart-series-doughnutseries.html and has successfully created the scenario based on the tutorial.
However, I need the chart to work inside HubSection. The snippet of the my XAML as below:
I need to periodically update the chart. So I couldn't use loaded. I only can search the control manually using VisualTreeHelper. How do I create the Donut Chart control manually? I know that we can create an control using below snippet:
I search the child using snippet like below:
Please advise. Thank you.
However, I need the chart to work inside HubSection. The snippet of the my XAML as below:
<HubSection Header="HubSection 2"> <DataTemplate> <Grid> <telerik:RadPieChart x:Name="mychart" Width="300" Height="300" ClipToBounds="False" PaletteName="DefaultDark"> <telerik:DoughnutSeries ShowLabels="True"> <telerik:DoughnutSeries.ValueBinding> <telerik:PropertyNameDataPointBinding PropertyName="Value"/> </telerik:DoughnutSeries.ValueBinding> </telerik:DoughnutSeries> </telerik:RadPieChart> </Grid> </DataTemplate> </HubSection>I need to periodically update the chart. So I couldn't use loaded. I only can search the control manually using VisualTreeHelper. How do I create the Donut Chart control manually? I know that we can create an control using below snippet:
private TextBlock NoArticlesTextBlock;I search the child using snippet like below:
static DependencyObject FindChildByName(DependencyObject from, string name) { int count = VisualTreeHelper.GetChildrenCount(from); for (int i = 0; i < count; i++) { var child = VisualTreeHelper.GetChild(from, i); if (child is FrameworkElement && ((FrameworkElement)child).Name == name) return child; var result = FindChildByName(child, name); if (result != null) return result; } return null; }Please advise. Thank you.