FontInfo.MergeWith メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > FontInfo.MergeWith メソッドの意味・解説 

FontInfo.MergeWith メソッド

指定した FontInfoフォント プロパティを、このメソッド呼び出し元である FontInfo クラスインスタンス結合します

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

Public Sub MergeWith ( _
    f As FontInfo _
)
Dim instance As FontInfo
Dim f As FontInfo

instance.MergeWith(f)
public void MergeWith (
    FontInfo f
)
public:
void MergeWith (
    FontInfo^ f
)
public void MergeWith (
    FontInfo f
)
public function MergeWith (
    f : FontInfo
)

パラメータ

f

結合するフォント プロパティ格納している FontInfo。

解説解説
使用例使用例

MergeWith メソッド使用してFontInfoフォント プロパティLabel コントロールFont プロパティ結合する方法次の例に示します

<%@ Page Language="VB" AutoEventWireup="True"
 %>

<html>

   <head>

      <script runat="server">

         Sub CopyFontInfo(sender As Object,
 e As EventArgs)

            ' Copy the FontInfo of Sample1Label to ResultLabel.
            ResultLabel.Font.CopyFrom(Sample1Label.Font)
    
            ResultLabel.Text = "Copy Result"

         End Sub

       </script>

   </head>

   <body>

      <form runat="server">

         <h3>FontInfo CopyFrom Example</h3>

         Click <b>Copy</b> to copy the font style
 of Font Sample 1 
         and display the result <br> in
 the Operation Result label.
         

         <br><br>

         <asp:Label id="Sample1Label" 
              Text="Font Sample 1" 
              Font-Name="Times New Roman" 
              Font-Italic="true" 
              Font-Strikeout="true" 
              runat="server" />

         <br><br>

         <asp:Button id="CopyButton" 
              Text="Copy" 
              OnClick="CopyFontInfo" 
              runat="server" />

         <br><br>

         Operation Result: <br>

         <asp:Label id="ResultLabel"
              runat="server" />

      </form>

   </body>

</html>
<%@ Page Language="C#" AutoEventWireup="True" %>

<html>

   <head>

      <script runat="server">

         void CopyFontInfo(Object sender, EventArgs e)
         {

            // Copy the FontInfo of Sample1Label to ResultLabel.
            ResultLabel.Font.CopyFrom(Sample1Label.Font);
    
            ResultLabel.Text = "Copy Result";

         }

       </script>

   </head>

   <body>

      <form runat="server">

         <h3>FontInfo CopyFrom Example</h3>

         Click <b>Copy</b> to copy the font style of Font Sample 1 
         and display the result <br> in the Operation Result
 label.
         

         <br><br>

         <asp:Label id="Sample1Label" 
              Text="Font Sample 1" 
              Font-Name="Times New Roman" 
              Font-Italic="true" 
              Font-Strikeout="true" 
              runat="server" />

         <br><br>

         <asp:Button id="CopyButton" 
              Text="Copy" 
              OnClick="CopyFontInfo" 
              runat="server" />

         <br><br>

         Operation Result: <br>

         <asp:Label id="ResultLabel"
              runat="server" />

      </form>

   </body>

</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
FontInfo クラス
FontInfo メンバ
System.Web.UI.WebControls 名前空間
CopyFrom
Font



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

辞書ショートカット

すべての辞書の索引

FontInfo.MergeWith メソッドのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS