DesignerAutoFormat.Style プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DesignerAutoFormat.Style プロパティの意味・解説 

DesignerAutoFormat.Style プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

関連付けられたコントロールデザインプレビュー表示するために DesignerAutoFormat オブジェクト使用する DesignerAutoFormatStyle オブジェクト取得します

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

Public ReadOnly Property
 Style As DesignerAutoFormatStyle
Dim instance As DesignerAutoFormat
Dim value As DesignerAutoFormatStyle

value = instance.Style
public DesignerAutoFormatStyle Style { get;
 }
public:
property DesignerAutoFormatStyle^ Style {
    DesignerAutoFormatStyle^ get ();
}
/** @property */
public DesignerAutoFormatStyle get_Style ()
public function get Style
 () : DesignerAutoFormatStyle

プロパティ
DesignerAutoFormatStyle

解説解説
使用例使用例

Style プロパティ使用して Web サーバー コントロール書式適用する方法次のコード例示します

' Applies styles based on the Name of the AutoFormat
Public Overrides Sub Apply(ByVal
 inLabel As Control)
    If TypeOf inLabel Is
 IndentLabel Then
        Dim ctl As IndentLabel = CType(inLabel,
 IndentLabel)

        ' Apply formatting according to the Name
        If Me.Name.Equals("MyClassic")
 Then
            ' For MyClassic, apply style elements directly to the control
            ctl.ForeColor = Color.Gray
            ctl.BackColor = Color.LightGray
            ctl.Font.Size = FontUnit.XSmall
            ctl.Font.Name = "Verdana,Geneva,Sans-Serif"
        ElseIf Me.Name.Equals("MyBright")
 Then
            ' For MyBright, apply style elements to the Style object
            Me.Style.ForeColor = Color.Maroon
            Me.Style.BackColor = Color.Yellow
            Me.Style.Font.Size = FontUnit.Medium

            ' Merge the AutoFormat style with the control's style
            ctl.MergeStyle(Me.Style)
        Else
            ' For the Default format, apply style elements to the control
            ctl.ForeColor = Color.Black
            ctl.BackColor = Color.Empty
            ctl.Font.Size = FontUnit.XSmall
        End If
    End If
End Sub
// Applies styles based on the Name of the AutoFormat
public override void Apply(Control inLabel)
{
    if (inLabel is IndentLabel)
    {
        IndentLabel ctl = (IndentLabel)inLabel;

        // Apply formatting according to the Name
        if (this.Name == "MyClassic")
        {
            // For MyClassic, apply style elements directly to the control
            ctl.ForeColor = Color.Gray;
            ctl.BackColor = Color.LightGray;
            ctl.Font.Size = FontUnit.XSmall;
            ctl.Font.Name = "Verdana,Geneva,Sans-Serif";
        }
        else if (this.Name
 == "MyBright")
        {
            // For MyBright, apply style elements to the Style property
            this.Style.ForeColor = Color.Maroon;
            this.Style.BackColor = Color.Yellow;
            this.Style.Font.Size = FontUnit.Medium;

            // Merge the AutoFormat style with the control's style
            ctl.MergeStyle(this.Style);
        }
        else
        {
            // For the Default format, apply style elements to the control
            ctl.ForeColor = Color.Black;
            ctl.BackColor = Color.Empty;
            ctl.Font.Size = FontUnit.XSmall;
        }
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DesignerAutoFormat クラス
DesignerAutoFormat メンバ
System.Web.UI.Design 名前空間
DesignerAutoFormat クラス
DesignerAutoFormatStyle
その他の技術情報
Web フォームデザインサポート

DesignerAutoFormatStyle プロパティ


パブリック プロパティパブリック プロパティ

( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ BackColor  Web サーバー コントロール背景色取得または設定します。 ( Style から継承されます。)
パブリック プロパティ BorderColor  Web サーバー コントロール境界線の色を取得または設定します。 ( Style から継承されます。)
パブリック プロパティ BorderStyle  Web サーバー コントロール境界線スタイル取得または設定します。 ( Style から継承されます。)
パブリック プロパティ BorderWidth  Web サーバー コントロール境界線の幅を取得または設定します。 ( Style から継承されます。)
パブリック プロパティ Container  Component格納している IContainer を取得します。 ( Component から継承されます。)
パブリック プロパティ CssClass  クライアントWeb サーバー コントロールによって表示されるカスケード スタイル シート (CSS: Cascading Style Sheet) クラス取得または設定します。 ( Style から継承されます。)
パブリック プロパティ Font  Web サーバー コントロール関連付けられたフォント プロパティ取得します。 ( Style から継承されます。)
パブリック プロパティ ForeColor  Web サーバー コントロール前景色 (通常テキストの色) を取得または設定します。 ( Style から継承されます。)
パブリック プロパティ Height  Web サーバー コントロールの高さを取得または設定します。 ( Style から継承されます。)
パブリック プロパティ IsEmpty  保護されているプロパティスタイル要素が状態バッグ定義されているかどうかを示す値を取得します。 ( Style から継承されます。)
パブリック プロパティ RegisteredCssClass  コントロール登録されているカスケード スタイル シート (CSS) を取得します。 ( Style から継承されます。)
パブリック プロパティ Site  Component の ISite を取得または設定します。 ( Component から継承されます。)
パブリック プロパティ VerticalAlign 関連付けられているコントロール内容の垂直方向の配置取得または設定します
パブリック プロパティ Width  Web サーバー コントロールの幅を取得または設定します。 ( Style から継承されます。)
プロテクト プロパティプロテクト プロパティ
参照参照

関連項目

DesignerAutoFormatStyle クラス
System.Web.UI.Design 名前空間
DesignerAutoFormat クラス
VerticalAlign
DesignerAutoFormatCollection クラス

その他の技術情報

Web フォームデザインサポート



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

辞書ショートカット

すべての辞書の索引

DesignerAutoFormat.Style プロパティのお隣キーワード
検索ランキング

   

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



DesignerAutoFormat.Style プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS