Visual Studio: Make view code default using attribute

后端 未结 3 398
醉酒成梦
醉酒成梦 2021-01-18 16:18

I know how to configure VS 2008 to open windows forms controls in code instead of the designer. But I think I have seen a way I could do this with an attribute I could decor

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-18 17:03

    The magic line you seek is:

    [System.ComponentModel.DesignerCategory("Code")]

    Just put that before your control-derived type and kiss that useless designer goodbye.

提交回复
热议问题