LinearAxis NovoINYAxis = new LinearAxis(); NovoINYAxis.Orientation = AxisOrientation.Y; NovoINYAxis.Location = AxisLocation.Left; NovoINYAxis.Name = "YLinearINAxis"; NovoINYAxis.AxisLabelStyle = userControl.Resources["IntegerAxisLabelStyle1"] as Style; NovoINYAxis.Minimum = 0; NovoINYAxis.Margin = new Thickness(2, 0, 2, 0); NovoINYAxis.ShowGridLines = true; Binding binding = new Binding(); binding.FallbackValue = 10; binding.ElementName = "userControl"; binding.Path = new PropertyPath("MaxIN"); NovoINYAxis.SetBinding(LinearAxis.MaximumProperty, binding); binding = new Binding(); binding.FallbackValue = 0; binding.ElementName = "userControl"; binding.Path = new PropertyPath("MinIN"); NovoINYAxis.SetBinding(LinearAxis.MinimumProperty, binding); Style gridLineStyle = new Style(typeof(Line)); gridLineStyle.Setters.Add(new Setter(Line.StrokeProperty, "White")); gridLineStyle.Setters.Add(new Setter(Line.StrokeThicknessProperty, 1)); gridLineStyle.Setters.Add(new Setter(Line.OpacityProperty, 0.4)); gridLineStyle.Setters.Add(new Setter(Line.StrokeDashArrayProperty, "6,4")); NovoINYAxis.GridLineStyle = gridLineStyle; VisualGrafico.Axes.Add(NovoINYAxis);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)