public override RadRect GetLabelLayoutSlot(DataPoint point, FrameworkElement visual, int labelIndex)
        {
            visual.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));

            double x = point.LayoutSlot.X + ((point.LayoutSlot.Width - visual.ActualWidth) / 2);
            double y = point.LayoutSlot.Y + ((point.LayoutSlot.Height - visual.ActualHeight) / 2);

            return new RadRect(x, y, visual.ActualWidth, visual.ActualHeight);
        }
        public static Size ControlSize(FrameworkElement control)
        {
            if (control.Visibility == Visibility.Collapsed)
            {
                return new Size(0.0, 0.0);
            }

            // Call measure to update the DesiredSize according to the content of the control
            control.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity));

            return control.DesiredSize;
        }