How to hide the inner controls of a UserControl in the Designer?

前端 未结 3 966
心在旅途
心在旅途 2020-12-22 11:13

I have a UserControl that contains a DropDownList and an ObjectDataSource. That control is used in the markup of my MasterPage.

In the Designer of a ContentPage that

3条回答
  •  猫巷女王i
    2020-12-22 11:27

    I'm guessing that the control you refer to, ComponentArt:Grid, have an associated ControlDesigner which can do about anything, including designtime editable areas and custom action menus (the menu associated with the arrow in the upper right corner).

    However, Visual Studio does not [last time I tried] execute the control designer for UserControls, so you can not easily control this. There's a lot of magic happening in the background in the UserControlDesigner including parsing the html code. However, I've never seen actual compilation of the codebehind file, where the ControlDesigner attribute would be specified.

    You will need to rewrite your control as a server control for Visual Studio to check for the attribute, and allowing your custom designtime view.

提交回复
热议问题