PropertyDescriptor PropertyDescriptor PropertyDescriptor PropertyDescriptor Class

定義

クラスのプロパティの抽象化を提供します。Provides an abstraction of a property on a class.

public ref class PropertyDescriptor abstract : System::ComponentModel::MemberDescriptor
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class PropertyDescriptor : System.ComponentModel.MemberDescriptor
type PropertyDescriptor = class
    inherit MemberDescriptor
Public MustInherit Class PropertyDescriptor
Inherits MemberDescriptor
継承
PropertyDescriptorPropertyDescriptorPropertyDescriptorPropertyDescriptor
派生
属性

次のコード例は、 PropertyDescriptorCollectionクラスの例に基づいて構築されています。The following code example is built upon the example in the PropertyDescriptorCollection class. テキストボックスには、ボタンのテキストの情報 (カテゴリ、説明、表示名) が出力されます。It prints the information (category, description, display name) of the text of a button in a text box. とは、 button1textbox1がフォームでインスタンス化されていることを前提としています。It assumes that button1 and textbox1 have been instantiated on a form.

// Creates a new collection and assign it the properties for button1.
PropertyDescriptorCollection^ properties = TypeDescriptor::GetProperties( button1 );

// Sets an PropertyDescriptor to the specific property.
System::ComponentModel::PropertyDescriptor^ myProperty = properties->Find( "Text", false );

// Prints the property and the property description.
textBox1->Text = String::Concat( myProperty->DisplayName, "\n" );
textBox1->Text = String::Concat( textBox1->Text, myProperty->Description, "\n" );
textBox1->Text = String::Concat( textBox1->Text, myProperty->Category, "\n" );
// Creates a new collection and assign it the properties for button1.
PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(button1);

// Sets an PropertyDescriptor to the specific property.
System.ComponentModel.PropertyDescriptor myProperty = properties.Find("Text", false);

// Prints the property and the property description.
textBox1.Text = myProperty.DisplayName+ '\n' ;
textBox1.Text += myProperty.Description + '\n';
textBox1.Text += myProperty.Category + '\n';
' Creates a new collection and assign it the properties for button1.
Dim properties As PropertyDescriptorCollection = TypeDescriptor.GetProperties(Button1)

' Sets an PropertyDescriptor to the specific property.
Dim myProperty As PropertyDescriptor = properties.Find("Text", False)

' Prints the property and the property description.
TextBox1.Text += myProperty.DisplayName & Microsoft.VisualBasic.ControlChars.Cr
TextBox1.Text += myProperty.Description & Microsoft.VisualBasic.ControlChars.Cr
TextBox1.Text += myProperty.Category & Microsoft.VisualBasic.ControlChars.Cr

次のコード例は、プロパティをラップする読み取り専用のラッパーを提供するカスタムプロパティ記述子を実装する方法を示しています。The following code example shows how to implement a custom property descriptor that provides a read-only wrapper around a property. SerializeReadOnlyPropertyDescriptor 、カスタムデザイナーで、コントロールのSizeプロパティの読み取り専用プロパティ記述子を提供するために使用されます。The SerializeReadOnlyPropertyDescriptor is used in a custom designer to provide a read-only property descriptor for the control's Size property.

using System;
using System.Collections;
using System.ComponentModel;
using System.Text;

namespace ReadOnlyPropertyDescriptorTest
{
    // The SerializeReadOnlyPropertyDescriptor shows how to implement a 
    // custom property descriptor. It provides a read-only wrapper 
    // around the specified PropertyDescriptor. 
    internal sealed class SerializeReadOnlyPropertyDescriptor : PropertyDescriptor
    {
        private PropertyDescriptor _pd = null;

        public SerializeReadOnlyPropertyDescriptor(PropertyDescriptor pd)
            : base(pd)
        {
            this._pd = pd;
        }

        public override AttributeCollection Attributes
        {
            get
            {
                return( AppendAttributeCollection(
                    this._pd.Attributes, 
                    ReadOnlyAttribute.Yes) );
            }
        }

        protected override void FillAttributes(IList attributeList)
        {
            attributeList.Add(ReadOnlyAttribute.Yes);
        }

        public override Type ComponentType
        {
            get
            {
                return this._pd.ComponentType;
            }
        }

        
        // The type converter for this property.
        // A translator can overwrite with its own converter.
        public override TypeConverter Converter
        {
            get
            {
                return this._pd.Converter;
            }
        }

        
        // Returns the property editor 
        // A translator can overwrite with its own editor.
        public override object GetEditor(Type editorBaseType)
        {
            return this._pd.GetEditor(editorBaseType);
        }

        // Specifies the property is read only.
        public override bool IsReadOnly
        {
            get
            {
                return true;
            }
        }

        public override Type PropertyType
        {
            get
            {
                return this._pd.PropertyType;
            }
        }

        public override bool CanResetValue(object component)
        {
            return this._pd.CanResetValue(component);
        }

     
        public override object GetValue(object component)
        {
            return this._pd.GetValue(component);
        }

        public override void ResetValue(object component)
        {
            this._pd.ResetValue(component);
        }

        public override void SetValue(object component, object val)
        {
            this._pd.SetValue(component, val);
        }

        // Determines whether a value should be serialized.
        public override bool ShouldSerializeValue(object component)
        {
            bool result = this._pd.ShouldSerializeValue(component);

            if (!result)
            {
                DefaultValueAttribute dva = (DefaultValueAttribute)_pd.Attributes[typeof(DefaultValueAttribute)];
                if (dva != null)
                {
                    result = !Object.Equals(this._pd.GetValue(component), dva.Value);
                }
                else
                {
                    result = true;
                }
            }

            return result;
        }

        // The following Utility methods create a new AttributeCollection
        // by appending the specified attributes to an existing collection.
        static public AttributeCollection AppendAttributeCollection(
            AttributeCollection existing, 
            params Attribute[] newAttrs)
        {
            return new AttributeCollection(AppendAttributes(existing, newAttrs));
        }

        
        static public Attribute[] AppendAttributes(
            AttributeCollection existing, 
            params Attribute[] newAttrs)
        {
            if (existing == null)
            {
                throw new ArgumentNullException(nameof(existing));
            }

            newAttrs ??= new Attribute[0];

            Attribute[] attributes;

            Attribute[] newArray = new Attribute[existing.Count + newAttrs.Length];
            int actualCount = existing.Count;
            existing.CopyTo(newArray, 0);

            for (int idx = 0; idx < newAttrs.Length; idx++)
            {
                if (newAttrs[idx] == null)
                {
                    throw new ArgumentNullException("newAttrs");
                }

                // Check if this attribute is already in the existing
                // array.  If it is, replace it.
                bool match = false;
                for (int existingIdx = 0; existingIdx < existing.Count; existingIdx++)
                {
                    if (newArray[existingIdx].TypeId.Equals(newAttrs[idx].TypeId))
                    {
                        match = true;
                        newArray[existingIdx] = newAttrs[idx];
                        break;
                    }
                }

                if (!match)
                {
                    newArray[actualCount++] = newAttrs[idx];
                }
            }

            // If some attributes were collapsed, create a new array.
            if (actualCount < newArray.Length)
            {
                attributes = new Attribute[actualCount];
                Array.Copy(newArray, 0, attributes, 0, actualCount);
            }
            else
            {
                attributes = newArray;
            }

            return attributes;
        }
    }
}
Imports System.Collections
Imports System.ComponentModel
Imports System.Text

' The SerializeReadOnlyPropertyDescriptor shows how to implement a 
' custom property descriptor. It provides a read-only wrapper 
' around the specified PropertyDescriptor. 
Friend NotInheritable Class SerializeReadOnlyPropertyDescriptor
    Inherits PropertyDescriptor
    Private _pd As PropertyDescriptor = Nothing


    Public Sub New(ByVal pd As PropertyDescriptor)
        MyBase.New(pd)
        Me._pd = pd

    End Sub


    Public Overrides ReadOnly Property Attributes() As AttributeCollection
        Get
            Return AppendAttributeCollection(Me._pd.Attributes, ReadOnlyAttribute.Yes)
        End Get
    End Property


    Protected Overrides Sub FillAttributes(ByVal attributeList As IList)
        attributeList.Add(ReadOnlyAttribute.Yes)

    End Sub


    Public Overrides ReadOnly Property ComponentType() As Type
        Get
            Return Me._pd.ComponentType
        End Get
    End Property


    ' The type converter for this property.
    ' A translator can overwrite with its own converter.
    Public Overrides ReadOnly Property Converter() As TypeConverter
        Get
            Return Me._pd.Converter
        End Get
    End Property


    ' Returns the property editor 
    ' A translator can overwrite with its own editor.
    Public Overrides Function GetEditor(ByVal editorBaseType As Type) As Object
        Return Me._pd.GetEditor(editorBaseType)

    End Function

    ' Specifies the property is read only.
    Public Overrides ReadOnly Property IsReadOnly() As Boolean
        Get
            Return True
        End Get
    End Property


    Public Overrides ReadOnly Property PropertyType() As Type
        Get
            Return Me._pd.PropertyType
        End Get
    End Property


    Public Overrides Function CanResetValue(ByVal component As Object) As Boolean
        Return Me._pd.CanResetValue(component)

    End Function


    Public Overrides Function GetValue(ByVal component As Object) As Object
        Return Me._pd.GetValue(component)

    End Function


    Public Overrides Sub ResetValue(ByVal component As Object)
        Me._pd.ResetValue(component)

    End Sub


    Public Overrides Sub SetValue(ByVal component As Object, ByVal val As Object)
        Me._pd.SetValue(component, val)

    End Sub

    ' Determines whether a value should be serialized.
    Public Overrides Function ShouldSerializeValue(ByVal component As Object) As Boolean
        Dim result As Boolean = Me._pd.ShouldSerializeValue(component)

        If Not result Then
            Dim dva As DefaultValueAttribute = _
                CType(_pd.Attributes(GetType(DefaultValueAttribute)), DefaultValueAttribute)
            If Not (dva Is Nothing) Then
                result = Not [Object].Equals(Me._pd.GetValue(component), dva.Value)
            Else
                result = True
            End If
        End If

        Return result

    End Function


    ' The following Utility methods create a new AttributeCollection
    ' by appending the specified attributes to an existing collection.
    Public Shared Function AppendAttributeCollection( _
        ByVal existing As AttributeCollection, _
        ByVal ParamArray newAttrs() As Attribute) As AttributeCollection

        Return New AttributeCollection(AppendAttributes(existing, newAttrs))

    End Function

    Public Shared Function AppendAttributes( _
        ByVal existing As AttributeCollection, _
        ByVal ParamArray newAttrs() As Attribute) As Attribute()

        If existing Is Nothing Then
            Throw New ArgumentNullException("existing")
        End If

        If newAttrs Is Nothing Then
            newAttrs = New Attribute(-1) {}
        End If

        Dim attributes() As Attribute

        Dim newArray(existing.Count + newAttrs.Length) As Attribute
        Dim actualCount As Integer = existing.Count
        existing.CopyTo(newArray, 0)

        Dim idx As Integer
        For idx = 0 To newAttrs.Length
            If newAttrs(idx) Is Nothing Then
                Throw New ArgumentNullException("newAttrs")
            End If

            ' Check if this attribute is already in the existing
            ' array.  If it is, replace it.
            Dim match As Boolean = False
            Dim existingIdx As Integer
            For existingIdx = 0 To existing.Count - 1
                If newArray(existingIdx).TypeId.Equals(newAttrs(idx).TypeId) Then
                    match = True
                    newArray(existingIdx) = newAttrs(idx)
                    Exit For
                End If
            Next existingIdx

            If Not match Then
                actualCount += 1
                newArray(actualCount) = newAttrs(idx)
            End If
        Next idx

        ' If some attributes were collapsed, create a new array.
        If actualCount < newArray.Length Then
            attributes = New Attribute(actualCount) {}
            Array.Copy(newArray, 0, attributes, 0, actualCount)
        Else
            attributes = newArray
        End If

        Return attributes

    End Function
End Class

次のコード例は、 SerializeReadOnlyPropertyDescriptorカスタムデザイナーでを使用する方法を示しています。The following code examples show how to use the SerializeReadOnlyPropertyDescriptor in a custom designer.

using System;
using System.Collections;
using System.ComponentModel;
using System.Text;
using System.Windows.Forms.Design;

namespace ReadOnlyPropertyDescriptorTest
{   
    class DemoControlDesigner : ControlDesigner
    {
        // The PostFilterProperties method replaces the control's 
        // Size property with a read-only Size property by using 
        // the SerializeReadOnlyPropertyDescriptor class.
        protected override void PostFilterProperties(IDictionary properties)
        {
            if (properties.Contains("Size"))
            {
                PropertyDescriptor original = properties["Size"] as PropertyDescriptor;
                SerializeReadOnlyPropertyDescriptor readOnlyDescriptor = 
                    new SerializeReadOnlyPropertyDescriptor(original);

                properties["Size"] = readOnlyDescriptor;
            }

            base.PostFilterProperties(properties);
        }
    }
}
Imports System.Collections
Imports System.ComponentModel
Imports System.Text
Imports System.Windows.Forms.Design

Class DemoControlDesigner
    Inherits ControlDesigner
    
    ' The PostFilterProperties method replaces the control's 
    ' Size property with a read-only Size property by using 
    ' the SerializeReadOnlyPropertyDescriptor class.
    Protected Overrides Sub PostFilterProperties(ByVal properties As IDictionary) 
        If properties.Contains("Size") Then
            Dim original As PropertyDescriptor = properties("Size")
            
            Dim readOnlyDescriptor As New SerializeReadOnlyPropertyDescriptor(original)
            
            properties("Size") = readOnlyDescriptor
        End If
        
        MyBase.PostFilterProperties(properties)
    
    End Sub
End Class
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;

namespace ReadOnlyPropertyDescriptorTest
{
    [Designer(typeof(DemoControlDesigner))]
    public class DemoControl : Control
    {
        public DemoControl()
        {
           
        }
    }
}
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Text
Imports System.Windows.Forms
Imports System.Windows.Forms.Design


<Designer(GetType(DemoControlDesigner))>  _
Public Class DemoControl
    Inherits Control
    
    Public Sub New() 
    
    End Sub
End Class

注釈

プロパティの説明は、名前、その属性、プロパティが関連付けられているコンポーネントクラス、およびプロパティの型で構成されます。A description of a property consists of a name, its attributes, the component class that the property is associated with, and the type of the property.

PropertyDescriptorには、次のプロパティとメソッドが用意されています。PropertyDescriptor provides the following properties and methods:

PropertyDescriptorには、次abstractのプロパティとメソッドも用意されています。PropertyDescriptor also provides the following abstract properties and methods:

  • ComponentTypeこのプロパティが関連付けられているコンポーネントの型を格納します。ComponentType contains the type of component this property is bound to.

  • IsReadOnlyこのプロパティが読み取り専用かどうかを示します。IsReadOnly indicates whether this property is read-only.

  • PropertyTypeプロパティの型を取得します。PropertyType gets the type of the property.

  • CanResetValueコンポーネントをリセットするとコンポーネントの値が変更されるかどうかを示します。CanResetValue indicates whether resetting the component changes the value of the component.

  • GetValueコンポーネントのプロパティの現在の値を返します。GetValue returns the current value of the property on a component.

  • ResetValueコンポーネントのこのプロパティの値をリセットします。ResetValue resets the value for this property of the component.

  • SetValueコンポーネントの値を別の値に設定します。SetValue sets the value of the component to a different value.

  • ShouldSerializeValueこのプロパティの値を永続化する必要があるかどうかを示します。ShouldSerializeValue indicates whether the value of this property needs to be persisted.

通常、 abstractメンバーはリフレクションによって実装されます。Typically, the abstract members are implemented through reflection. リフレクションの詳細については、「リフレクション」のトピックを参照してください。For more information about reflection, see the topics in Reflection.

コンストラクター

PropertyDescriptor(MemberDescriptor) PropertyDescriptor(MemberDescriptor) PropertyDescriptor(MemberDescriptor) PropertyDescriptor(MemberDescriptor)

指定した PropertyDescriptor 内の名前と属性を使用して、MemberDescriptor クラスの新しいインスタンスを初期化します。Initializes a new instance of the PropertyDescriptor class with the name and attributes in the specified MemberDescriptor.

PropertyDescriptor(MemberDescriptor, Attribute[]) PropertyDescriptor(MemberDescriptor, Attribute[]) PropertyDescriptor(MemberDescriptor, Attribute[]) PropertyDescriptor(MemberDescriptor, Attribute[])

指定した PropertyDescriptor 内の名前と、MemberDescriptor および MemberDescriptor 配列の両方に格納されている属性を使用して、Attribute クラスの新しいインスタンスを初期化します。Initializes a new instance of the PropertyDescriptor class with the name in the specified MemberDescriptor and the attributes in both the MemberDescriptor and the Attribute array.

PropertyDescriptor(String, Attribute[]) PropertyDescriptor(String, Attribute[]) PropertyDescriptor(String, Attribute[]) PropertyDescriptor(String, Attribute[])

名前と属性を指定して、PropertyDescriptor クラスの新しいインスタンスを初期化します。Initializes a new instance of the PropertyDescriptor class with the specified name and attributes.

プロパティ

AttributeArray AttributeArray AttributeArray AttributeArray

属性の配列を取得または設定します。Gets or sets an array of attributes.

(Inherited from MemberDescriptor)
Attributes Attributes Attributes Attributes

メンバーの属性のコレクションを取得します。Gets the collection of attributes for this member.

(Inherited from MemberDescriptor)
Category Category Category Category

CategoryAttribute で指定されている、メンバーが属するカテゴリの名前を取得します。Gets the name of the category to which the member belongs, as specified in the CategoryAttribute.

(Inherited from MemberDescriptor)
ComponentType ComponentType ComponentType ComponentType

派生クラスでオーバーライドされた場合、プロパティが関連付けられているコンポーネントの型を取得します。When overridden in a derived class, gets the type of the component this property is bound to.

Converter Converter Converter Converter

プロパティの型コンバーターを取得します。Gets the type converter for this property.

Description Description Description Description

DescriptionAttribute で指定されている、メンバーの説明を取得します。Gets the description of the member, as specified in the DescriptionAttribute.

(Inherited from MemberDescriptor)
DesignTimeOnly DesignTimeOnly DesignTimeOnly DesignTimeOnly

DesignOnlyAttribute で指定されている、メンバーを設定できるのがデザイン時だけかどうかを示す値を取得します。Gets whether this member should be set only at design time, as specified in the DesignOnlyAttribute.

(Inherited from MemberDescriptor)
DisplayName DisplayName DisplayName DisplayName

[プロパティ] ウィンドウなどのウィンドウに表示できる名前を取得します。Gets the name that can be displayed in a window, such as a Properties window.

(Inherited from MemberDescriptor)
IsBrowsable IsBrowsable IsBrowsable IsBrowsable

BrowsableAttribute で指定されている、メンバーが参照可能かどうかを示す値を取得します。Gets a value indicating whether the member is browsable, as specified in the BrowsableAttribute.

(Inherited from MemberDescriptor)
IsLocalizable IsLocalizable IsLocalizable IsLocalizable

プロパティをローカライズする必要があるかどうかを示す、LocalizableAttribute で指定されている値を取得します。Gets a value indicating whether this property should be localized, as specified in the LocalizableAttribute.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

派生クラスでオーバーライドされた場合、プロパティが読み取り専用かどうかを示す値を取得します。When overridden in a derived class, gets a value indicating whether this property is read-only.

Name Name Name Name

メンバーの名前を取得します。Gets the name of the member.

(Inherited from MemberDescriptor)
NameHashCode NameHashCode NameHashCode NameHashCode

GetHashCode() で指定されている、メンバーの名前のハッシュ コードを取得します。Gets the hash code for the name of the member, as specified in GetHashCode().

(Inherited from MemberDescriptor)
PropertyType PropertyType PropertyType PropertyType

派生クラスでオーバーライドされた場合、プロパティの型を取得します。When overridden in a derived class, gets the type of the property.

SerializationVisibility SerializationVisibility SerializationVisibility SerializationVisibility

プロパティをシリアル化する必要があるかどうかを示す、DesignerSerializationVisibilityAttribute で指定されている値を取得します。Gets a value indicating whether this property should be serialized, as specified in the DesignerSerializationVisibilityAttribute.

SupportsChangeEvents SupportsChangeEvents SupportsChangeEvents SupportsChangeEvents

このプロパティの値変更通知をプロパティ記述子以外から発生させてよいかどうかを示す値を取得します。Gets a value indicating whether value change notifications for this property may originate from outside the property descriptor.

メソッド

AddValueChanged(Object, EventHandler) AddValueChanged(Object, EventHandler) AddValueChanged(Object, EventHandler) AddValueChanged(Object, EventHandler)

プロパティが変更されたときに、ほかのオブジェクトに通知できるようにします。Enables other objects to be notified when this property changes.

CanResetValue(Object) CanResetValue(Object) CanResetValue(Object) CanResetValue(Object)

派生クラスでオーバーライドされた場合、オブジェクトをリセットしたときに、そのオブジェクトの値が変化するかどうかを示す値を返します。When overridden in a derived class, returns whether resetting an object changes its value.

CreateAttributeCollection() CreateAttributeCollection() CreateAttributeCollection() CreateAttributeCollection()

コンストラクターに渡された属性配列を使用して、属性のコレクションを作成します。Creates a collection of attributes using the array of attributes passed to the constructor.

(Inherited from MemberDescriptor)
CreateInstance(Type) CreateInstance(Type) CreateInstance(Type) CreateInstance(Type)

指定した型のインスタンスを作成します。Creates an instance of the specified type.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

プロパティ記述子を別のオブジェクトと比較して、等しいかどうかを確認します。Compares this to another object to see if they are equivalent.

FillAttributes(IList) FillAttributes(IList) FillAttributes(IList) FillAttributes(IList)

指定した親クラスの属性リストに PropertyDescriptor の属性を追加します。Adds the attributes of the PropertyDescriptor to the specified list of attributes in the parent class.

GetChildProperties() GetChildProperties() GetChildProperties() GetChildProperties()

既定の PropertyDescriptorCollection を返します。Returns the default PropertyDescriptorCollection.

GetChildProperties(Attribute[]) GetChildProperties(Attribute[]) GetChildProperties(Attribute[]) GetChildProperties(Attribute[])

指定した属性配列をフィルターとして使用して、PropertyDescriptorCollection を返します。Returns a PropertyDescriptorCollection using a specified array of attributes as a filter.

GetChildProperties(Object) GetChildProperties(Object) GetChildProperties(Object) GetChildProperties(Object)

指定したオブジェクトの PropertyDescriptorCollection を返します。Returns a PropertyDescriptorCollection for a given object.

GetChildProperties(Object, Attribute[]) GetChildProperties(Object, Attribute[]) GetChildProperties(Object, Attribute[]) GetChildProperties(Object, Attribute[])

指定した属性配列をフィルターとして使用して、指定したオブジェクトの PropertyDescriptorCollection を返します。Returns a PropertyDescriptorCollection for a given object using a specified array of attributes as a filter.

GetEditor(Type) GetEditor(Type) GetEditor(Type) GetEditor(Type)

指定した型のエディターを取得します。Gets an editor of the specified type.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

このオブジェクトのハッシュ コードを返します。Returns the hash code for this object.

GetInvocationTarget(Type, Object) GetInvocationTarget(Type, Object) GetInvocationTarget(Type, Object) GetInvocationTarget(Type, Object)

このメソッドでは、メンバーの呼び出し中に使用するオブジェクトが返されます。This method returns the object that should be used during invocation of members.

GetType() GetType() GetType() GetType()

現在のインスタンスの Type を取得します。Gets the Type of the current instance.

(Inherited from Object)
GetTypeFromName(String) GetTypeFromName(String) GetTypeFromName(String) GetTypeFromName(String)

型名を使用して型を返します。Returns a type using its name.

GetValue(Object) GetValue(Object) GetValue(Object) GetValue(Object)

派生クラスでオーバーライドされた場合、コンポーネントのプロパティの現在の値を取得します。When overridden in a derived class, gets the current value of the property on a component.

GetValueChangedHandler(Object) GetValueChangedHandler(Object) GetValueChangedHandler(Object) GetValueChangedHandler(Object)

特定のコンポーネントについて現在の ValueChanged イベント ハンドラー セットを取得します。Retrieves the current set of ValueChanged event handlers for a specific component

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object.

(Inherited from Object)
OnValueChanged(Object, EventArgs) OnValueChanged(Object, EventArgs) OnValueChanged(Object, EventArgs) OnValueChanged(Object, EventArgs)

実装した ValueChanged イベントを発生させます。Raises the ValueChanged event that you implemented.

RemoveValueChanged(Object, EventHandler) RemoveValueChanged(Object, EventHandler) RemoveValueChanged(Object, EventHandler) RemoveValueChanged(Object, EventHandler)

プロパティが変更されたときに、ほかのオブジェクトに通知できるようにします。Enables other objects to be notified when this property changes.

ResetValue(Object) ResetValue(Object) ResetValue(Object) ResetValue(Object)

派生クラスでオーバーライドされた場合、コンポーネントのプロパティの値を既定値にリセットします。When overridden in a derived class, resets the value for this property of the component to the default value.

SetValue(Object, Object) SetValue(Object, Object) SetValue(Object, Object) SetValue(Object, Object)

派生クラスでオーバーライドされた場合、コンポーネントの値を別の値に設定します。When overridden in a derived class, sets the value of the component to a different value.

ShouldSerializeValue(Object) ShouldSerializeValue(Object) ShouldSerializeValue(Object) ShouldSerializeValue(Object)

派生クラスでオーバーライドされた場合、プロパティの値を永続化する必要があるかどうかを示す値を決定します。When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.

ToString() ToString() ToString() ToString()

現在のオブジェクトを表す文字列を返します。Returns a string that represents the current object.

(Inherited from Object)

適用対象

こちらもご覧ください