2013-01-24 118 views

回答

1

您必須查看映射到名稱空間前綴x的名稱空間的URI。查看XML文檔的頂部,它將包含類似xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"的內容。

然後,您可以使用完整的XML命名空間URI從上面像這樣實例化XAttribute

new XAttribute(XName.Get("Class", "http://schemas.microsoft.com/winfx/2006/xaml"), "WorkflowConsoleApplication1.modify") 

延伸閱讀: