Reuse of code in Windows Phone 8 Development
Posted on January 27, 2014
Manikanthr has a few XAML files that are common to three projects. He wants to know if there is a way to re-use code without copying the files into each of the projects manually.
SB Dev suggests that one way could be to reuse a separate project and simply reference that in other projects which would share the namespace. paulo.morgado suggests linking files to projects.Andrejt suggests that creating code snippets is an option he would consider if he wanted to put these files in separate assemblies with their own namespaces. João Cardoso thinks that the suggestion to use a separate Library Assembly is a better option, because it can be referenced to make debugging easier. More discussion follows regarding optimum design in such scenarios.
Manikanthr finds Paulo’s suggestion sufficient for his requirements, along with a hint from SB Dev regarding sharing the resources.
This discussion was selected as a featured discussion because it shows how certain tasks can be handled in different ways based on use-case.
Keep those interesting questions coming!