Duplicate names in visual tree


  • I am creating a simple silverlight control and incorporating a button control and popup.  I give the button a name (i.e. x:name="AButton") so I can interact with in with code.  When I add more than one of these controls to another silverlight application, I get a runtime error the button name already existing in the visual tree.  Am I breaking a rule where you are not allowed to name things in controls you create or is there something else I am not doing correctly?

    Monday, March 24, 2008 9:36 AM


  • You can work around this by especially naming your control in a namespace like fashion for example


    Monday, March 24, 2008 9:54 AM