ADBlock is blocking some content on the site

ADBlock errore

Set a UserControl Property to Not Show Up in VS Properties Window

StackOverflow https://stackoverflow.com/questions/71440


I have a UserControl in my Asp.net project that has a public property. I do not want this property to show up in the Visual Studio Property Window when a user highlights an instance of the UserControl in the IDE. What attribute (or other method) should I use to prevent it from showing up?

class MyControl : System.Web.UI.UserControl {
  // Attribute to prevent property from showing in VS Property Window?
  public bool SampleProperty { get; set; }

  // other stuff


Use the following attribute ...

using System.ComponentModel;

public bool SampleProperty { get; set; }

In VB.net, this will be:



Tons of attributes out there to control how the PropertyGrid works.

public bool HiddenProperty {get;set;}

Use the System.ComponentModel.Browsable attribute to

> ' VB
>     <System.ComponentModel.Browsable(False)>


// C#

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow