LegendCell.CellSpan 属性

定义

获取或设置用于绘制图例单元内容的水平单元数。Gets or sets the number of horizontal cells used to draw the contents of the legend cell.

public:
 virtual property int CellSpan { int get(); void set(int value); };
public virtual int CellSpan { get; set; }
member this.CellSpan : int with get, set
Public Overridable Property CellSpan As Integer

属性值

Int32

一个 integer 值,该值表示用于绘制图例单元内容的水平单元数。An integer value that represents the number of horizontal cells used to draw the legend cell contents. 默认值为 1。The default value is 1.

注解

如果单元格的内容超出了单元格的宽度,则可以将 CellSpan 属性设置为适应内容所需的单元格数。If the cell contents must extend beyond the cell width, you can set the CellSpan property to the number of cells required to fit the contents. 如果要向图例添加扩展页眉或标题,最常使用此属性。This property is most often used if you wish to add an extended header or title to the legend.

如果将此属性设置为大于1的值,则必须添加空图例单元,才能容纳扩展图例单元格的内容。When this property is set to a value larger than 1, empty legend cells must be added in order to accommodate the contents of the extended legend cell.

适用于