BrowsableAttribute Class
TOC
Collapse the table of content
Expand the table of content

BrowsableAttribute Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Specifies whether a property or event should be displayed in a Properties window.

System::Object
  System::Attribute
    System.ComponentModel::BrowsableAttribute

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)

No code example is currently available or this language may not be supported.

The BrowsableAttribute type exposes the following members.

  NameDescription
Public methodBrowsableAttributeInitializes a new instance of the BrowsableAttribute class.
Top

  NameDescription
Public propertyBrowsableGets a value indicating whether an object is browsable.
Top

  NameDescription
Public methodEqualsIndicates whether this instance and a specified object are equal. (Overrides Attribute::Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code for this instance. (Overrides Attribute::GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodMatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public fieldStatic memberDefaultSpecifies the default value for the BrowsableAttribute, which is Yes. This static field is read-only.
Public fieldStatic memberNoSpecifies that a property or event cannot be modified at design time. This static field is read-only.
Public fieldStatic memberYesSpecifies that a property or event can be modified at design time. This static field is read-only.
Top

A visual designer typically displays in the Properties window those members that either have no browsable attribute or are marked with the BrowsableAttribute constructor's browsable parameter set to true. These members can be modified at design time. Members marked with the BrowsableAttribute constructor's browsable parameter set to false are not appropriate for design-time editing and therefore are not displayed in a visual designer. The default is true.

NoteNote:

When you mark a property with Browsable(true), the value of this attribute is set to the constant member Yes. For a property marked with Browsable(false), the value is No. Therefore, when you check the value of this attribute in your code, you must specify the attribute as BrowsableAttribute::Yes or BrowsableAttribute::No.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2017 Microsoft