[DevExpress]ChartControl之设置Legend位于底部并居中

关键代码:

        /// <summary>

        /// 设置Legend位于底部并居中

        /// </summary>

        /// <param name="lengend">Legend</param>

        public static void SetBottomCenter(this Legend legend)

        {

            legend.Direction = LegendDirection.LeftToRight;

            legend.AlignmentHorizontal = LegendAlignmentHorizontal.Center;

            legend.AlignmentVertical = LegendAlignmentVertical.BottomOutside;

        }

运行效果:

捕获

你可能感兴趣的:(DevExpress)