Copying WPF window paste gives error

I realized that VS is giving an error when we try to copy paste to one of the windows. Errors are usually of type, method call is ambiguous between InitializeComponet () or other methods. This is because VS only renames the xaml files, but not the associated CS files. I don't know why VS is not handling this. What is the best way to copy pasting existing windows that won't give any errors. Or is this their easy way? What else do we need to manually rename?

+1


source to share


1 answer


VS renames XAML and associated CS files. What it doesn't do is change the name of the class and constructor name in the CS file and the x: class property in the XAML file. If you change them it will work fine.



I don't think there is a workaround, but I don't think this is much work either.

+2


source







All Articles