AmbientValueAttribute コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > AmbientValueAttribute コンストラクタの意味・解説 

AmbientValueAttribute コンストラクタ (Object)


AmbientValueAttribute コンストラクタ

AmbientValueAttribute クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
AmbientValueAttribute (Boolean) 値としてブール値を指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Byte) 値として 8 ビット符号なし整数指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Char) 値として Unicode 文字指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Double) 値として倍精度浮動小数点数指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Int16) 値として 16 ビット符号付き整数指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Int32) 値として 32 ビット符号付き整数指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Int64) 値として 64 ビット符号付き整数指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Object) 値としてオブジェクト指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Single) 値として単精度浮動小数点数指定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (String) 値として文字列設定してAmbientValueAttribute クラス新しインスタンス初期化します。
AmbientValueAttribute (Type, String) 値とその型を指定してAmbientValueAttribute クラス新しインスタンス初期化します。
参照参照

関連項目

AmbientValueAttribute クラス
AmbientValueAttribute メンバ
System.ComponentModel 名前空間

AmbientValueAttribute コンストラクタ (Int64)


AmbientValueAttribute コンストラクタ (Type, String)

値とその型を指定して、AmbientValueAttribute クラス新しインスタンス初期化します。

名前空間: System.ComponentModel
アセンブリ: System (system.dll 内)
構文構文

Dim type As Type
Dim value As String

Dim instance As New AmbientValueAttribute(type,
 value)
public AmbientValueAttribute (
    Type type,
    string value
)
public:
AmbientValueAttribute (
    Type^ type, 
    String^ value
)
public AmbientValueAttribute (
    Type type, 
    String value
)
public function AmbientValueAttribute (
    type : Type, 
    value : String
)

パラメータ

type

value パラメータType

value

この属性の値。

使用例使用例

AmbientValueAttribute使用してAlertForeColor というプロパティアンビエント動作適用するコード例次に示します。完全なコードの一覧については、「方法 : Windows フォーム コントロール属性適用する」を参照してください

<AmbientValue(GetType(Color), "Empty"),
 _
Category("Appearance"), _
DefaultValue(GetType(Color), "White"),
 _
Description("The color used for painting alert text.")>
 _
Public Property AlertForeColor() As
 Color
    Get
        If Me.alertForeColorValue = Color.Empty
 AndAlso Not (Me.Parent
 Is Nothing) Then
            Return Parent.ForeColor
        End If

        Return Me.alertForeColorValue
    End Get

    Set(ByVal value As Color)
        Me.alertForeColorValue = value
    End Set
End Property

' This method is used by designers to enable resetting the
' property to its default value.
Public Sub ResetAlertForeColor()
    Me.AlertForeColor = AttributesDemoControl.defaultAlertForeColorValue
End Sub

' This method indicates to designers whether the property
' value is different from the ambient value, in which case
' the designer should persist the value.
Private Function ShouldSerializeAlertForeColor()
 As Boolean
    Return Me.alertForeColorValue <>
 AttributesDemoControl.ambientColorValue
End Function
[AmbientValue(typeof(Color), "Empty")]
[Category("Appearance")]
[DefaultValue(typeof(Color), "White")]
[Description("The color used for painting alert text.")]
public Color AlertForeColor
{
    get
    {
        if (this.alertForeColorValue == Color.Empty
 &&
            this.Parent != null)
        {
            return Parent.ForeColor;
        }

        return this.alertForeColorValue;
    }

    set
    {
        this.alertForeColorValue = value;
    }
}

// This method is used by designers to enable resetting the
// property to its default value.
public void ResetAlertForeColor()
{
    this.AlertForeColor = AttributesDemoControl.defaultAlertForeColorValue;
}

// This method indicates to designers whether the property
// value is different from the ambient value, in which case
// the designer should persist the value.
private bool ShouldSerializeAlertForeColor()
{
    return (this.alertForeColorValue != AttributesDemoControl.ambientColorValue);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
AmbientValueAttribute クラス
AmbientValueAttribute メンバ
System.ComponentModel 名前空間

AmbientValueAttribute コンストラクタ (Byte)


AmbientValueAttribute コンストラクタ (Boolean)


AmbientValueAttribute コンストラクタ (Single)


AmbientValueAttribute コンストラクタ (Int16)


AmbientValueAttribute コンストラクタ (Int32)


AmbientValueAttribute コンストラクタ (Char)


AmbientValueAttribute コンストラクタ (Double)


AmbientValueAttribute コンストラクタ (String)




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

辞書ショートカット

すべての辞書の索引

「AmbientValueAttribute コンストラクタ」の関連用語

AmbientValueAttribute コンストラクタのお隣キーワード
検索ランキング

   

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



AmbientValueAttribute コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS