获取一个 Microsoft.Office.Interop.Excel.Font,它表示 XmlMappedRange 控件的字体。
命名空间:  Microsoft.Office.Tools.Excel
程序集:  Microsoft.Office.Tools.Excel(在 Microsoft.Office.Tools.Excel.dll 中)
语法
声明
ReadOnly Property Font As Font
    Get
Font Font { get; }
属性值
类型:Microsoft.Office.Interop.Excel.Font
一个 Microsoft.Office.Interop.Excel.Font,表示 XmlMappedRange 控件的字体。
示例
下面的代码示例使用 Font 属性显示 XmlMappedRange 的当前字体。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange。
Private Sub DisplayFontName()
    MsgBox("The current font for the XmlMappedRange named " & _
        "CustomerLastNameCell is: " & Me.CustomerLastNameCell.Font.Name)
End Sub
private void DisplayFontName()
{
    MessageBox.Show("The current font for the XmlMappedRange named " +
        "CustomerLastNameCell is: " + this.CustomerLastNameCell.Font.Name);
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。