I would like to know the ActualWidth and ActualHeight of the XamChart.Scene, but it's resulting to 0.0. I added a Loaded event on my .cs file.
How can I get the ActualWidth and ActualHeight of the XamChart.Scene?
I suppose the ActualHeight and ActualWidth returns 0 in the Loaded event just because the Scene element is not created at this time. You can handle the Loaded event of the Scene instead e.g.
xamChart1.Scene.Loaded+=new RoutedEventHandler(Scene_Loaded);
private void Scene_Loaded(object sender, RoutedEventArgs e){ double width = xamChart1.Scene.ActualWidth; double height = xamChart1.Scene.ActualHeight; MessageBox.Show(width.ToString() + " " + height.ToString());}
Let me know if you have any questions with this matter.
Vlad