AmbientValueAttribute 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
AmbientValueAttribute 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| AmbientValueAttribute(Boolean) |
해당 값에 대한 부울 값이 AmbientValueAttribute 지정된 경우 클래스의 새 인스턴스를 초기화합니다. |
| AmbientValueAttribute(Byte) |
해당 값에 대해 부호 없는 8비트 정수가 지정된 경우 클래스의 AmbientValueAttribute 새 인스턴스를 초기화합니다. |
| AmbientValueAttribute(Char) |
해당 값에 대한 유니코드 문자가 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(Boolean)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대한 부울 값이 AmbientValueAttribute 지정된 경우 클래스의 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(bool value);
public AmbientValueAttribute(bool value);
new System.ComponentModel.AmbientValueAttribute : bool -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Boolean)
매개 변수
- value
- Boolean
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Byte)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대해 부호 없는 8비트 정수가 지정된 경우 클래스의 AmbientValueAttribute 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(System::Byte value);
public AmbientValueAttribute(byte value);
new System.ComponentModel.AmbientValueAttribute : byte -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Byte)
매개 변수
- value
- Byte
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Char)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대한 유니코드 문자가 AmbientValueAttribute 지정된 경우 클래스의 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(char value);
public AmbientValueAttribute(char value);
new System.ComponentModel.AmbientValueAttribute : char -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Char)
매개 변수
- value
- Char
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Double)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대한 배정밀도 부동 소수점 번호가 지정된 경우 클래스의 AmbientValueAttribute 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(double value);
public AmbientValueAttribute(double value);
new System.ComponentModel.AmbientValueAttribute : double -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Double)
매개 변수
- value
- Double
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Int16)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대해 부가된 16비트 정수가 지정된 경우 클래스의 AmbientValueAttribute 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(short value);
public AmbientValueAttribute(short value);
new System.ComponentModel.AmbientValueAttribute : int16 -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Short)
매개 변수
- value
- Int16
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Int32)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대해 부가된 32비트 정수가 지정된 경우 클래스의 AmbientValueAttribute 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(int value);
public AmbientValueAttribute(int value);
new System.ComponentModel.AmbientValueAttribute : int -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Integer)
매개 변수
- value
- Int32
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Int64)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대해 부가된 64비트 정수가 지정된 경우 클래스의 AmbientValueAttribute 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(long value);
public AmbientValueAttribute(long value);
new System.ComponentModel.AmbientValueAttribute : int64 -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Long)
매개 변수
- value
- Int64
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Object)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대한 개체가 AmbientValueAttribute 지정된 경우 클래스의 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(System::Object ^ value);
public AmbientValueAttribute(object? value);
public AmbientValueAttribute(object value);
new System.ComponentModel.AmbientValueAttribute : obj -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Object)
매개 변수
- value
- Object
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Single)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대한 단정밀도 부동 소수점 번호가 지정된 경우 클래스의 AmbientValueAttribute 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(float value);
public AmbientValueAttribute(float value);
new System.ComponentModel.AmbientValueAttribute : single -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As Single)
매개 변수
- value
- Single
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(String)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
해당 값에 대한 문자열이 AmbientValueAttribute 지정된 경우 클래스의 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(System::String ^ value);
public AmbientValueAttribute(string? value);
public AmbientValueAttribute(string value);
new System.ComponentModel.AmbientValueAttribute : string -> System.ComponentModel.AmbientValueAttribute
Public Sub New (value As String)
매개 변수
- value
- String
이 특성의 값입니다.
적용 대상
AmbientValueAttribute(Type, String)
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
- Source:
- AmbientValueAttribute.cs
값과 해당 형식이 AmbientValueAttribute 지정된 경우 클래스의 새 인스턴스를 초기화합니다.
public:
AmbientValueAttribute(Type ^ type, System::String ^ value);
public AmbientValueAttribute(Type type, string value);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Generic TypeConverters may require the generic types to be annotated. For example, NullableConverter requires the underlying type to be DynamicallyAccessedMembers All.")]
public AmbientValueAttribute(Type type, string value);
new System.ComponentModel.AmbientValueAttribute : Type * string -> System.ComponentModel.AmbientValueAttribute
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Generic TypeConverters may require the generic types to be annotated. For example, NullableConverter requires the underlying type to be DynamicallyAccessedMembers All.")>]
new System.ComponentModel.AmbientValueAttribute : Type * string -> System.ComponentModel.AmbientValueAttribute
Public Sub New (type As Type, value As String)
매개 변수
- value
- String
이 특성의 값입니다.
- 특성
예제
다음 코드 예제에서는 호출 AmbientValueAttribute된 속성에 대 한 앰비언트 동작을 적용 하는 데 사용 AlertForeColor 하는 방법을 보여 줍니다. 전체 코드 목록은 방법: Windows Forms 컨트롤의 특성 적용 참조하세요.
[AmbientValue(typeof(Color), "Empty")]
[Category("Appearance")]
[DefaultValue(typeof(Color), "White")]
[Description("The color used for painting alert text.")]
public Color AlertForeColor
{
get =>
_alertForeColorValue == Color.Empty &&
Parent != null
? Parent.ForeColor
: _alertForeColorValue;
set => _alertForeColorValue = value;
}
// This method is used by designers to enable resetting the
// property to its default value.
public void ResetAlertForeColor() =>
AlertForeColor = s_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.
bool ShouldSerializeAlertForeColor() =>
_alertForeColorValue != s_ambientColorValue;
<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 (Me.Parent IsNot 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