private void ResetLabel(AxisLabelControl label) { label.Opacity = this.MeasureLabelHelper.Opacity; label.Content = (object)null; label.SetLabelContentBounds(double.PositiveInfinity, double.PositiveInfinity); }
private AxisLabelControl CreateLabel() { AxisLabelControl axisLabelControl = new AxisLabelControl(); axisLabelControl.SetBinding(FrameworkElement.StyleProperty, (BindingBase)new Binding("LabelStyle") { Source = (object)this.Axis }); axisLabelControl.DataContext = (object)axisLabelControl; return axisLabelControl; }
protected Rect GetChildContentRectangle(AxisLabelControl child, double availableLength) { return this.GetChildRectangle(child, child.GetLabelContentDesiredSize(), availableLength); }
protected Rect GetChildRectangle(AxisLabelControl child, Size desiredSize, double availableLength) { Size size = new Size(this.ElementWidth(desiredSize), this.ElementHeight(desiredSize)); return new Rect(this.Presenter.ConvertScaleToAxisUnits(this.GetCenterCoordinate((UIElement)child), availableLength) - size.Width / 2.0, 0.0, size.Width, size.Height); }
internal Point MeasureLabelAngleOffset(AxisLabelControl control) { return this.GetAngleOffsetBySize(control.GetLabelContentDesiredSize(), control.RotationAngle); }