问题
My project is on .Net V2.0, some of controls are in public, when change form in design mode this controls changed to private. how can i fix this? thanks. When Modifier changed to private, in Property Tool Box Modifier property not show. many of controls go to below section of form in picture 2.
回答1:
I assume you are making the controls public by editing the Designer.cs
file, there is a reason they put the warning in there that your changes will be lost.
The correct way is to mark the control's Modifers
setting to public
in design view from the properties menu for your control.
EDIT: Well I'll be damned, you don't have a modifiers option. Well, here is a workaround, create a property that is public that you control that can point at the private member.
public RadPageView pgvTabsPublic
{
get {return pgvTabs;}
}
Using this you can have other classes call yourForm.pgvTabsPublic
and it will point them to the internal private pgvTabs
member.
回答2:
This problem for Version of telerik i use, before i use version 2012 and now use 2013,fix it and work it, thanks
来源:https://stackoverflow.com/questions/17637366/protection-level-modifiers-of-controls-change-automaticlly-in-net