prevent the designer from calling a getter (VS 2008, WinForms)

Posted by LLEA on Stack Overflow See other posts from Stack Overflow or by LLEA
Published on 2010-03-18T14:26:49Z Indexed on 2010/03/18 14:41 UTC
Read the original article Hit count: 539

hi, I have a simple UserControl containing a ComboBox which is empty at first. The setter for that CB adds items to it and the getter returns the selected item. When adding this UC to a Form, the designer automatically calls the getter for the CB which is empty. The method to fill up the CB with items is called later. I can think of one or two ways to bypass this problem by "messing around" in the code. But before I start that I'd like to ask you if there is a way to stop the designer from calling the getter method. Maybe with a attribute similar to Browsable or Bindable? thx

© Stack Overflow or respective owner

Related posts about winforms

Related posts about visual-studio