XmlMappedRange.Width 屬性
取得 XmlMappedRange 控制項的寬度 (以點為單位)。
命名空間: Microsoft.Office.Tools.Excel
組件: Microsoft.Office.Tools.Excel (在 Microsoft.Office.Tools.Excel.dll 中)
語法
'宣告
ReadOnly Property Width As Object
Get
Object Width { get; }
屬性值
型別:System.Object
XmlMappedRange 控制項的寬度 (以點為單位)。
範例
下列程式碼範例使用 Width 和 Height 屬性,顯示名為 CustomerLastNameCell 的 XmlMappedRange 之寬度和高度。 這個程式碼範例假設目前工作表包含名為 CustomerLastNameCell 的 XmlMappedRange。
Private Sub DisplayHeightAndWidth()
MsgBox("CustomerLastNameCell is " & _
Me.CustomerLastNameCell.Width & _
" points wide and " & Me.CustomerLastNameCell.Height & _
" points high.")
End Sub
private void DisplayHeightAndWidth()
{
MessageBox.Show("CustomerLastNameCell is " +
this.CustomerLastNameCell.Width + " points wide and " +
this.CustomerLastNameCell.Height + " points high.");
}
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。