I want to create a custom modifier for a polar chart.
But I failed immediately!
First I wanted to add a simple 10×10 px ellipse.
But the ellipse doesn’t appear on the chart!
public override void OnModifierMouseDown(ModifierMouseArgs e)
{
var translatedPont = ParentSurface.RootGrid.TranslatePoint(e.MousePoint, ParentSurface.ModifierSurface);
var point = new Ellipse
{
Width = 10,
Height = 10,
Stroke = Brushes.White,
StrokeThickness = 1,
Fill = Brushes.Gray
};
ParentSurface.ModifierSurface.Children.Add(point);
point.MeasureArrange();
var leftCoordinate = translatedPont.X - point.ActualWidth / 2;
var topCoordinate = translatedPont.Y - point.ActualHeight / 2;
Canvas.SetLeft(point, leftCoordinate);
Canvas.SetTop(point, topCoordinate);
...
- Ivan Lepekhov asked 4 years ago
- You must login to post comments
Please login first to submit.