Usercontrol Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Pope

    Usercontrol Help

    Hi Everyone!

    I have a usercontrol that was developed in a project. I need to copy the
    exact class and call it something different so I can make some major
    enhancements to it. I don't want to change the existing control because it's
    being used right now and we make updates peridically.

    What is the best way to do this? I have tried to just copy the class files,
    rename them, add them to the project, and attempt to change the class name
    references to the new name. The problem I am seeing is when I view the
    control in the designer. it's blank.

    Any help would be appreciated,

    Thanks,

    D.


  • Michael Groeger

    #2
    Re: Usercontrol Help

    Hi David,

    you might want to extend your user control using inheritance. It's quite
    easy going, but comes with some restrictions.

    Put the control in an assembly, create a second assembly, reference the
    first and create a new user control deriving from the first one.
    Then you should be able to extend your new control w/o changing the old one.

    The problem you currently have is that you probably did not copy the
    resx-file which layouts your control.

    Michael

    "David Pope" <dpope@nospam.s atx.rr.com> schrieb im Newsbeitrag
    news:u#aAWEy9EH A.2600@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Hi Everyone!
    >
    > I have a usercontrol that was developed in a project. I need to copy the
    > exact class and call it something different so I can make some major
    > enhancements to it. I don't want to change the existing control because[/color]
    it's[color=blue]
    > being used right now and we make updates peridically.
    >
    > What is the best way to do this? I have tried to just copy the class[/color]
    files,[color=blue]
    > rename them, add them to the project, and attempt to change the class name
    > references to the new name. The problem I am seeing is when I view the
    > control in the designer. it's blank.
    >
    > Any help would be appreciated,
    >
    > Thanks,
    >
    > D.
    >
    >[/color]


    Comment

    Working...