L
L
lvr2014-01-30 14:11:00
Microsoft Silverlight
lvr, 2014-01-30 14:11:00

What is the strategy for developing a White-Label application for Windows Phone?

There is a task to develop applications for Windows Phone that will be logically the same within the margin of error, but may have different visual design. I think how to build an application to provide different "skins" with the same code base.
Skins will differ primarily in different colors of elements, different pictures and different texts, but it would be nice to provide the ability to vary the arrangement of elements.
I see the general solution in the form of a bundle of the Class Library, in which the logic will be placed, and the application itself with customization.
I see the following options:
1. Placement in the Class Library ViewModel, and in the application - XAML and minimal code-behind
What confuses in the option:
a) that XAML markup will spawn in applications, mostly through copy-paste.
b) the presence of a minimum code-behind (of which there may be a lot), which will also be copy-pasted
2. Creating a base class for pages in the Class Library
In fact, option 1, but allows you to get rid of the Code-Behind in the application.
Of the minuses - accessing controls from the base class (of course, assuming that they are in the markup) will need to be searched, which reduces the transparency of the
code , describing the appearance of pages and controls (Control Templates).
The option looks tempting, but I have not found a way in the application to override the styles applied to pages in the included Class Library. In addition, the option gives less flexibility in customization variations.
I understand that the question is ambiguous, and the advantages of some options are the disadvantages of others, but still I would like to hear the opinion of experts. Maybe someone has come across this. Or who can offer another option?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Doshevsky, 2014-01-30
@lvr

Move all the styles that need to be replaced into a ResourceDictionary.
Further, you can have one project that will contain all your code. When you need to make another application, replace the project files (.csproj, manifest, StoreAssociation, StoreKey) and the ResourceDictionary file. Thus, for a new application, you only need to make project files and a dictionary with new styles.
If you have a lot of such applications, you can make a simple build system that will generate project files on the basis of the config and build applications using a compiler (without VisualStudio)

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question