???? ID: 813450 - ????? ???????: 05 ?????? 2010 - ??????: 2.0 ????? ???? ?? UserControl ???????? ?? ????? ?? ??? ???? ?? ?? ???????? ???????? ???????-???? ?? ??? ??? ????? C# ?? ????? ??
?? ????? ?????????? ??? ?? ??? ???? ????? ?? ?? ???? ????? ?? ??? ???UserControlact ?? ??? ??? ?? ???? ?? ??? ??????-??? ?? ??? ???????? ???????? ??? ????????UserControl?? Windows ???????? ???? ?? ???? ???????? ???? ?? ??? ?????? ????????? ?? ???? ?? ????UserControl. To do this, theUserControlmust act as a control container. ????????? ??????By default, aUserControlobject can act as a control container only when you create the control. To make aUserControlhost a constituent control after you put theUserControlon a Windows Form, you must change the default designer of theUserControl. To implement design-time services for a component, use theDesignerAttribute?? ????System.ComponentModel??? ????? ??? TheDesignerAttributecomes before the class declaration. ???????DesignerAttributeby passing thedesignerTypeName??designerBaseType????????? designerTypeNameis the fully qualified name of the designer type that provides design-time services. Pass the combination of theSystem.Windows.Forms.Design.ParentControlDesigner??System.Design?? ???designerTypeName????????? TheParentControlDesignerclass extends design-time behavior for aUserControl. designerBaseTypeis the name of the base class for the designer. The class that is used for the design-time services must implement the IDesigner interface. Create the UserControl as a Design-Time Control Container
Test the UserControl
?????????? ??????? ?? ???, ????? Microsoft ??? ???? ?????: ParentControlDesigner ???? (VS.71) http://MSDN.Microsoft.com/en-us/library/SYSTEM.Windows.forms.design.parentcontroldesigner .aspx (http://msdn.microsoft.com/en-us/library/system.windows.forms.design.parentcontroldesigner(VS.71).aspx) DesignerAttribute ???? (vs.71) http://MSDN.Microsoft.com/en-us/library/SYSTEM.componentmodel.designerattribute .aspx (http://msdn.microsoft.com/en-us/library/system.windows.forms.design.parentcontroldesigner(VS.71).aspx) ???? ???? ???? ??:
???? ?????? ??????????????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??. ?????????? ?? ??????? ????????? ??????? ??:813450
(http://support.microsoft.com/kb/813450/en-us/
)
| ???? ?????? ???? ?????? ??????
????????? ?????? ??????? ???????? ??????
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

????? ?? ???? ????
