Rebrand WP7 Application - windows-phone-7

I have a WP7 application which I need to rebrand. I'm using Visual Studio 2012.
My problem is how manage brands in the most automatic way.
Lets say I developed the app for the Main Brand, and I need to restyle for the Secondary Brand.
Secondary Brand consist in change of Images and part some base styles (the base style are used and thus referenced by other style and templates which are shared).
I would prefer to have the XAP with only Images for its own Brand.
I need also to have the possibility to use the designer with one brand or another.
I tried to use a TFS Branch for this purpose, it is satisfing but at every merge (new features or bug fix in the Main Branch that must be merged in the Secondary Branch), I need to pay attention to not overwrite Images and Styles (if changed), it is an error prone process and lead to undetected and critical mistake.
I thinking about bring everything back on the main branch and manage Brands by moving all Images and Style that differs, into different 'theme' class libraries but how can I easily switch between references (I need the designer, so at design time) ? Is there a way to have different references for different solution configuration ?
Another option could be to use the Branch and the 2 theme class library, in the secondary branch the app will reference the secondary theme class library. On the paper it seems the best options, both branch will link statically the resources, they will have their designer branded, merge should not impact anything modified in the 'theme' libraries. Before try it i would like to know if anyone has a better option or foresee any problem on this.
Thank You.

I had similar project, and I can share the way I was trying to solve it.
I had following project structure
AppName.Common - here all common code, views and data templates defined
AppName.Main - here is App.xaml for main project, Resources with specific styles and images
AppName.Branded - here is App.xaml for branded project, Resources with specific styles and images. Also in App.xaml I configure IoC container, because some of behaviors were different for Branded and for Main proj.
All styles are defined in App.xaml in Resourced dictionary. So, in runtime app can resolve them. Sometimes you need to reopen solution, and also ReSharper can't support in, it fails to resolve you styles.
Blend for VS can support this structure. You just select current project as a Start-up proj.
Hope it will help you.
Don't forget, that if you navigate to View from other assembly, you need to change path.

Related

XCode child project override parent project

Tell me where to look / dig. There is a project, an online store. This project contains screens, custom views, settings, and so on.
The task now is to do the same projects only for different brands.
I'm thinking of making some kind of global project as a library with my own settings and then connect it.
But I have questions, I would like to consult.
Do I understand correctly that I can create a "library" from the project, where the settings will be set (color, logo, text, etc.), but I can't, for example, completely change some screen.
I don’t understand one thing, for example, if they tell me I need to completely redo the authorization screen and profile, how can I do this, override something?
Tell me which way to look. Thanks a lot!

Menu-commands extension for Visual Studio without command-table

I am building a Visual Studio extension (VSIX) with menu commands depending on the options for the extension. Its dynamic, what commands (how many) depends on the options.
I have a solution for it that uses the command-table, like: Dynamically add menu items
I would like to skip the command-table and build the menus totally programmatically, like: HOWTO: Package with commands created by code
The reason is to make it more dynamic. So if the user adds/changes/deletes in the options of the extension it would be handled dynamically (programmatically). On saving options the menu-command tree would be rebuildt. If I use a command-table I will have to add/delete nodes there to be able to solve it.
The thing I can not figure out is howto add the objects for "groups" and "menus" programmatically.
So I am out for the class/interface that has "AddGroup" or "AddMenu" as methods.
Is this at all possible or do I have to use the command-table? If it is possible I would appreciate links to code-examples for it.
Regards Hans
MVP Carlos Quintero has published sample code using IVsProfferCommmands3.AddNamedCommand that illustrates how to programmatically add menu items via the automation services (formerly utilized by the now discontinued add-in extensibility model).
https://github.com/visualstudioextensibility/VSX-Samples/tree/master/PackageCommandsCreatedByCode
While add-ins are no longer supported, the automation interfaces are still present. So you can use these, bearing in mind these menu items (aka commands) are temporary.
Also, the sample code here is a little outdated, using Package instead of AsyncPackage, and ProvideAutoLoad attributes. So you'll also want to read up on the following:
https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/AsyncPackageMigration
https://devblogs.microsoft.com/visualstudio/updates-to-synchronous-autoload-of-extensions-in-visual-studio-2019/
Sincerely,

How can I programmatically add xaml elements in Visual Studio 2017?

I have a C++/winrt project with a complex and dynamic xaml interface created in C++ code. Now I am moving to the latest VS 15.9.0 Preview 3, which has platform support for C++/Winrt and also allows use of the xaml designer in such a project. But I don't want to use the designer and have turned it off in Tools/Options/Xaml. The result is that none of my programmatic xaml elements appears. The project seems to expect me to enter these elements in a xaml code page, rather than using C++, e.g. Grid(), StackPanel(), view.RowDefinitions.Append(), view.SetRow() etc. The GeneratedFiles folder is now full of items that were not present in the previous project, yet can't be removed. Is it still possible to use the C++ interface for xaml, and what must be done to enable it if so? Thanks.
Ryan is correct: C++/winrt does support programmatic creation of xaml, and it works great. With the help of a couple of c++/winrt guys at MS I think I also know why my code was not doing anything. In the former version of my app I had declared MainPage as a C++ class, not a struct, and had assigned the starting Grid for the xaml by getting the current Window and setting currentWindow.Content(theGrid). But in the new template app MainPage is a struct, which might matter, and while setting window.Content that way no longer works, this does: this->Content(theGrid). Leaving aside some irrelevant issues about declarations in the BlankApp, this I think is the answer. Programmatic xaml works if you set that initial content as above.
Unfortunately, this is not the intended way to use this UI system. XAML-based UI systems are descendants of WPF, which relies on the Model-View-ViewModel (MVVM) pattern.
This pattern intends three types of classes to make up your application: Views, which are primarily written in XAML, and only deal with displaying data they are given; ViewModels, which are the wrapper and translator to give the views data, and to give the models commands; and lastly, Models, which are your backend business-logic classes.
Your instinct to not trust the designer is reasonable - it generates messy and unidiomatic XAML code. But it is an excellent way to preview the way your XAML code looks.
To get back to your specific situation, there are real problems in the library's API that will be serious roadblocks to programmatically define a UI in C++. Instead, you will want to use XAML to declare the UI. Adding and removing grid column definitions is not something that is well-supported, but using StackPanels and DockPanels is the normal way to do this.
If you have more specific questions, feel free to open a new question here, but do bear in mind that you may want to search first under the tags mvvm and wpf in addition to xaml, c++-winrt, and winrt.
If you have more questions that are rather broad and may be too broad for the main site here, feel free to join the WPF channel on chat, but bear in mind that most of us don't have experience in WinRT specifically.

Joomla Quickstart advice

Please I need some guidelines (or link of tutorials) in creating Joomla (3 - 3.5) website with the purchased template design. I wonder how professionals with experience are solving my doubts in practice.
Do you recommend the installation of the purchased blank template with a single installation and configuration of modules and components or installation of template with demo examples (Quickstart)? I know the differences but I was wondering how you are doing.
Till now I've almost always used the Quickstart installation.
I wonder if you clone the main menu (and other navigation and modules) and than you rename a copy for your needs and you change the content or you delete all navigation items except Home and than you are re-creating items according to your needs.
I'm not sure if I can copy the main menu or I copy only his necessary items and than delete overage of template.
It happens to me sometimes if I click on some of category it leads me to the main menu from original item, not to the desired custom copy, even though the path is set (the default items). Therefore, I am not sure which is better... copy main menu and items or to delete all navigation and content of the Quickstart installation and form my own navigation, content and modules.
In short, how to sort out all unnecessary items, and those that I am using should I copy and modify, modify existing, or delete all and make my own needed items.
I believe you will know my concerns.
Thank you and regards,
John
I have created several websites in Joomla with blank template and also with quickstart package.
Advantages with Blank Template
You will get the core theme without any unnecessary content and
basic modules and plugins. You dont have to delete any
contents/articles later.
You will be having authority to place modules at your desired positions. To check the modules position at the frontend simply do this http://example.com/?tp=1.
Disadvantage of Blank Template
There are some module style settings embedded in quickstart package that you wont be able to set yourself without going through full documentation. So sometimes your menu seems distorted.
Disadvantage of Quickstart Package
Deleteing unnecessary articles, removing unnecessary modules is a big headache.
Database size unnecessarily increases.
Steps I follow
I create a quickstart package in localhost and create a blank site with blank template in live site. Whatever settings I need I copy from the local website so that I am saved from removing unnecessary contents from live site. Also sometimes deleting some contents give rise to some other issues. Its better t go with a Blank template.

Mockup application for application with many pages?

I have been using Balsamiq to create mockups for a new application. It has been working very well initially, but now it feels like the application is becoming to large for Balsamiq.
I have connected many Balsamiq screens with the link function in Balsamiq. But that forces me to create way too many screens. Every click makes me create a completely new screen. So if I want to change a button that I am using on many linked screens, then I have to change all of them.
Is there a different application for creating mockups that doesn't force me to create new mockups for every click? I don't know exactly what I'm looking for but maybe something where only parts of the mockup application change when I click on a link?
There is also no functionality in Balsamiq for maintaining my mockups in a structure. Maybe that would help as well. What I'm looking for in essence is an application that let's me mockup more complex applications with many clicks and pages.
WireframeSketcher is a wireframe tool that has projects and lets you organize mockups in directories. It's based on Eclipse IDE and so it shares the same advanced way of organizing files. WireframeSketcher also supports refactoring which makes it easy to move files around or rename them without breaking links.
Look into using "symbols" in Balsamiq, that may help you out some. What you can do is take any group and make it a symbol. Then you can use the symbols on multiple pages. If you want to change the button in multiple places, all you have to do is change the symbol once, and the changes will be carried out throughout the rest of your design. Hope that helps.
MockupScreens has "master screens", similar to master slides in PowerPoint. You do create new screens technically, but you don't do them from scratch.
Since they derive most of their content from the master, you edit only the differences: value in some field, for example.
(I am m.screens developer)

Resources