XElement.ReplaceAttributes Method (Object)
Replaces the attributes of this element with the specified content.
Assembly: System.Xml.Linq (in System.Xml.Linq.dll)
This method first removes existing attributes. It then adds the specified content.
For more information about the valid content that can be passed to this function, see Valid Content of XElement and XDocument Objects in the .NET Framework documentation.
The following example creates an element with three attributes. It then uses this method to replace all of the attributes of the element with a single attribute.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.