Is it possible to load a UserControl into an anonymous object, instead of just instantiating it?
问题 Currently I'm generating UserControls as follows in an abstract base class so they are available for any other pages that implement the base class: // doc is an XML file that may or may not contain a TopStrapline node var pageControls = new { TopStrapline = (from strap in doc.Elements("TopStrapline") select new TopStrapline { StraplineText = (string)strap.Attribute("text") }).FirstOrDefault(), // loads of other UserControls generated from other nodes }; // if there's a StrapLine node, I want