public CartesianGrid() { //ShapeStyle arrowStyle = new ShapeStyle() //{ // Color = Color.FromArgb(255, 128, 128, 255), // Fill = new SolidColorBrush(Color.FromArgb(255, 128, 128, 255)), // StrokeWidth = 1, // Name = "ArrowStyle" //}; var axisStyle = new LineStyle() { Color = Color.FromArgb(255, 128, 128, 255), Name = "AxisStyle", StrokeWidth = 1 }; var gridStyle = new LineStyle() { Color = Colors.LightGray, Name = "GridStyle", StrokeWidth = 0.5 }; var labelsStyle = new TextStyle() { Color = Color.FromArgb(255, 128, 128, 255), FontSize = 12.0, Name = "LabelsStyle" }; OriginPoint = Factory.CreatePointByCoordinates(Drawing, () => 0, () => 0); XUnitPoint = Factory.CreatePointByCoordinates(Drawing, () => 1, () => 0); YUnitPoint = Factory.CreatePointByCoordinates(Drawing, () => 0, () => 1); OriginPoint.Name = "Origin"; XUnitPoint.Name = "XUnitPoint"; YUnitPoint.Name = "YUnitPoint"; OriginPoint.Visible = false; XUnitPoint.Visible = false; YUnitPoint.Visible = false; XAxisLine = Factory.CreateAxis(Drawing, new[] { OriginPoint, XUnitPoint }); YAxisLine = Factory.CreateAxis(Drawing, new[] { OriginPoint, YUnitPoint }); XAxisLine.Name = "XAxisLine"; YAxisLine.Name = "YAxisLine"; AxisLabels = new AxisLabelsCollection() { Drawing = Drawing }; GridLines = new RectangularGridLinesCollection() { Drawing = Drawing }; //XAxisLine.Arrow.Style = arrowStyle; XAxisLine.Line.Style = axisStyle; //YAxisLine.Arrow.Style = arrowStyle; YAxisLine.Line.Style = axisStyle; GridLines.Style = gridStyle; AxisLabels.Style = labelsStyle; Children.Add( OriginPoint, XUnitPoint, YUnitPoint, XAxisLine, YAxisLine, AxisLabels, GridLines ); }
public AxisLabelRange(AxisLabelsCollection collection) { Collection = collection; }