I would like to use DataPointSelection to open a new XAML page using NavigationPage. After adding a new class such as the following:
public class CustomSelectionBehavior : ChartSelectionBehavior
{
protected override async void OnSelectionChanged(ChartSelectionEventArgs arg)
{
base.OnSelectionChanged(arg);
await Navigation.PushAsync(new SomePage());
}
}
I receive a "The name 'Navigation' does not exist in the current context" error.
What is the proper way to handle this?
Secondly, I need to open a different page based on what data point is selected, such as:
if (DataPointId == DataPoint1Id)
{
// open data point 1 page
}
else if (DataPointId == DataPoint2Id
{
// open data point 2 page
}
...
What is the proper way to handle this as well?
Thanks!