FontInfo.Sizeとは? わかりやすく解説

FontInfo.Size プロパティ

指定したフォント サイズ取得または設定します。FontSize 型であることが必要です。既定値NotSet です。

名前空間: System.Web.UI.MobileControls
アセンブリ: System.Web.Mobile (system.web.mobile.dll 内)
構文構文

<BindableAttribute(True)> _
Public Property Size As
 FontSize
Dim instance As FontInfo
Dim value As FontSize

value = instance.Size

instance.Size = value
[BindableAttribute(true)] 
public FontSize Size { get; set;
 }
[BindableAttribute(true)] 
public:
property FontSize Size {
    FontSize get ();
    void set (FontSize value);
}
/** @property */
public FontSize get_Size ()

/** @property */
public void set_Size (FontSize value)

プロパティ
指定したフォント サイズを示す列挙値。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
FontInfo クラス
FontInfo メンバ
System.Web.UI.MobileControls 名前空間
FontSize

FontInfo.Size プロパティ

フォント サイズ取得または設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim instance As FontInfo
Dim value As FontUnit

value = instance.Size

instance.Size = value
public FontUnit Size { get; set;
 }
public:
property FontUnit Size {
    FontUnit get ();
    void set (FontUnit value);
}
/** @property */
public FontUnit get_Size ()

/** @property */
public void set_Size (FontUnit value)

プロパティ
フォント サイズを表す FontUnit。

例外例外
例外種類条件

ArgumentOutOfRangeException

指定したフォント サイズが負の値です。

解説解説
使用例使用例

Size プロパティ使用してプログラムによって Label コントロールフォント サイズ変更する方法次の例に示します

<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  Sub Page_Load(ByVal sender As
 Object, ByVal e As EventArgs)
  
    ' When the page loads, set the the myLabel Label control's FontInfo
 properties.
    ' Note that myLabel.Font is a FontInfo object.
    
    myLabel.Font.Bold = True
    myLabel.Font.Italic = False
    myLabel.Font.Name = "verdana"
    myLabel.Font.Overline = False
    myLabel.Font.Size = 10
    myLabel.Font.Strikeout = False
    myLabel.Font.Underline = True
    
    ' Write information on the FontInfo object to the myLabel label.
    myLabel.Text = myLabel.Font.ToString()
    
  End Sub

</script>

<html  >
<head id="Head1" runat="server">
    <title>FontInfo Example</title>
</head>
  <body>
    <form id="form1" runat="server">
    <h3>FontInfo Example</h3>
      <asp:Label id="myLabel" 
        runat="server" >
      </asp:Label>
    </form>
  </body>
</html>
<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  void Page_Load(object sender, EventArgs e)
  {
    // When the page loads, set the the myLabel Label control's FontInfo
 properties.
    // Note that myLabel.Font is a FontInfo object.
    
    myLabel.Font.Bold = true;
    myLabel.Font.Italic = false;
    myLabel.Font.Name = "verdana";
    myLabel.Font.Overline = false;
    myLabel.Font.Size = 10;
    myLabel.Font.Strikeout = false;
    myLabel.Font.Underline = true;
    
    // Write information on the FontInfo object to the myLabel label.
    myLabel.Text = myLabel.Font.ToString();
    
  }

</script>

<html  >
<head runat="server">
    <title>FontInfo Example</title>
</head>
  <body>
    <form id="form1" runat="server">
    <h3>FontInfo Example</h3>
      <asp:Label id="myLabel" 
        runat="server" >
      </asp:Label>
    </form>
  </body>
</html>
<%@ Page Language="JScript" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  function Page_Load(sender, e : EventArgs)
  {
    // When the page loads, set the the myLabel Label control's FontInfo
 properties.
    // Note that myLabel.Font is a FontInfo object.

    myLabel.Font.Bold = true;
    myLabel.Font.Italic = false;
    myLabel.Font.Name = "verdana";
    myLabel.Font.Overline = false;
    myLabel.Font.Size = 10;
    myLabel.Font.Strikeout = false;
    myLabel.Font.Underline = true;

    // Write information on the FontInfo object to the myLabel label.
    myLabel.Text = myLabel.Font.ToString();
  }

</script>

<html  >
<head runat="server">
    <title>FontInfo Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <h3>FontInfo Example</h3>
      <asp:Label id="myLabel" 
        runat="server" >
      </asp:Label>
    </form>
  </body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
FontInfo クラス
FontInfo メンバ
System.Web.UI.WebControls 名前空間
FontInfo.Bold プロパティ
FontInfo.Italic プロパティ
FontInfo.Names プロパティ
FontInfo.Names プロパティ
FontInfo.Overline プロパティ
Strikeout
Underline



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「FontInfo.Size」の関連用語

FontInfo.Sizeのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



FontInfo.Sizeのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS