.net - Generic UserControl with ComponentResourceManager syntax error -


in winforms project (vs2010, .net 4.0) had user control named myview, derived system.windows.forms.usercontrol. modified control generic user control:

partial class myview(of tentity {new, class})         inherits system.windows.forms.usercontrol       ' source code here  end class 

unfortunately, auto-generated initializecomponent() code vs winforms designer supplied vb.net syntax error , produce compilation error:

    dim resources system.componentmodel.componentresourcemanager =  new system.componentmodel.componentresourcemanager(gettype(myview))  

instead of above line of code, there should be:

    dim resources system.componentmodel.componentresourcemanager =  new system.componentmodel.componentresourcemanager(gettype(myview(of tentity))) 

how can fix behavior of vs2010 winforms designer?

related topic explanations , proposed workaround: fix embedded resources generic usercontrol

the chances it's bug vs2010.

bypass way quite similar known method fix vs limitation of using vs winforms designer controls , forms derived generic type. involves creating of additional accessory class.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -