XmlMappedRange.Font 屬性

定義

取得 Font,表示 XmlMappedRange 控制項的字型。Gets a Font that represents the font of the XmlMappedRange control.

public Microsoft.Office.Interop.Excel.Font Font { get; }

屬性值

Font

Font,表示 XmlMappedRange 控制項的字型。A Font that represents the font of the XmlMappedRange control.

範例

下列程式碼範例會使用 Font 屬性來顯示的目前字型 XmlMappedRangeThe following code example uses the Font property to display the current font for an XmlMappedRange. 這個程式碼範例假設目前的工作表包含 XmlMappedRange 名為的 CustomerLastNameCellThis code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

private void DisplayFontName()
{
    MessageBox.Show("The current font for the XmlMappedRange named " +
        "CustomerLastNameCell is: " + this.CustomerLastNameCell.Font.Name);
}
Private Sub DisplayFontName()
    MsgBox("The current font for the XmlMappedRange named " & _
        "CustomerLastNameCell is: " & Me.CustomerLastNameCell.Font.Name)
End Sub

適用於