Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Visual Studio 2015. Properties Window in Collection editor form doesn't allow to perfrom reset for the property.

$
0
0

Hi All

I have class in the collection with public property and 

    public int Width
    {
      get
      {
        if (widthStored)
          return width;
        else
          return DefaultWidth();
      }
      set
      {
        if ((widthStored == false) || (width != value))
        {
          widthStored = true;
          width = value;
          WidthChanged();
        }
      }
    }

    private bool ShouldSerializeWidth()
    {
      return (widthStored == true);
    }

    public void ResetWidth()
    {
      widthStored = false;
      WidthChanged();
    }

I can reset property Width in the standart Property list window

But I can't show Reset menu in the PropertyGrid of Collection editor Form.

How to make Reset menu work in Collection editor form.


Viewing all articles
Browse latest Browse all 2535

Trending Articles