DataGridViewRowHeaderCell.GetContentBounds 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回围绕单元格内容区域的边框,该区域是使用指定的 Graphics 和单元格样式计算的。
protected:
override System::Drawing::Rectangle GetContentBounds(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex);
C#
protected override System.Drawing.Rectangle GetContentBounds (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex);
override this.GetContentBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle
Protected Overrides Function GetContentBounds (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer) As Rectangle
- graphics
- Graphics
单元格的图形上下文。
- cellStyle
- DataGridViewCellStyle
要应用到单元格的 DataGridViewCellStyle。
- rowIndex
- Int32
该单元格的父行索引。
用于限定单元格内容的 Rectangle。
产品 | 版本 |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |