File tree Expand file tree Collapse file tree
WpfDesign.Designer/Tests/Designer
WpfDesign.XamlDom/Project Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -265,8 +265,8 @@ public void PasteCustomControlUsingMixedTypes()
265265 "</sdtcontrols:CustomButton>\n " ;
266266
267267 AssertGridDesignerOutput ( expectedXaml , grid . Context ,
268- "xmlns:sdtcontrols =\" http://sharpdevelop.net/ WpfDesign/ Tests/Controls \" " ,
269- "xmlns:Controls0 =\" clr-namespace:ICSharpCode. WpfDesign. Tests.Designer;assembly=ICSharpCode.WpfDesign.Tests \" " ) ;
268+ "xmlns:Controls0 =\" clr-namespace:ICSharpCode. WpfDesign. Tests.Designer;assembly=ICSharpCode.WpfDesign.Tests \" " ,
269+ "xmlns:sdtcontrols =\" http://sharpdevelop.net/ WpfDesign/ Tests/Controls \" " ) ;
270270 }
271271
272272 [ Test ]
@@ -294,8 +294,8 @@ public void PasteCustomControlUsingStaticResource()
294294 "<sdtcontrols:CustomButton Tag=\" {StaticResource res1}\" />\n " ;
295295
296296 AssertGridDesignerOutput ( expectedXaml , grid . Context ,
297- "xmlns:Controls0=\" clr-namespace:ICSharpCode.WpfDesign.Tests.Designer;assembly=ICSharpCode.WpfDesign.Tests\" " ,
298- "xmlns:sdtcontrols=\" http://sharpdevelop.net/WpfDesign/Tests/Controls\" " ) ;
297+ "xmlns:Controls0=\" clr-namespace:ICSharpCode.WpfDesign.Tests.Designer;assembly=ICSharpCode.WpfDesign.Tests\" " ,
298+ "xmlns:sdtcontrols=\" http://sharpdevelop.net/WpfDesign/Tests/Controls\" " ) ;
299299
300300 var xamlContext = grid . Context as XamlDesignContext ;
301301 Assert . IsNotNull ( xamlContext ) ;
Original file line number Diff line number Diff line change @@ -139,6 +139,8 @@ internal XmlAttribute XmlAttribute {
139139
140140 string GetPrefixOfNamespace ( string ns , XmlElement target )
141141 {
142+ if ( target . NamespaceURI == ns )
143+ return null ;
142144 var prefix = target . GetPrefixOfNamespace ( ns ) ;
143145 if ( ! string . IsNullOrEmpty ( prefix ) )
144146 return prefix ;
You can’t perform that action at this time.
0 commit comments