Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
Talk:Having multiple App names while sharing AppResources
Manikanthr - A great solution to create multiple apps
Hi, Thanks for this article as this helped me to achieve non-duplication. I will explain my problem, which is pretty much similar to your problem statement, I have referred all of my classes(Mainpage.xaml, Page01.xaml, Page02.xaml and their corresponding .cs files). My sub-project does not have any classes, which I have referred from base. Now I want to use the sub project's resource file to read data. Basically it is AppResources.resx file, how do I get string value from the sub-project's AppResources in my project.
Please do let me know, if I have to provide any extra explanation.Thanks and really humbled by the way I'm finding my problem solutions here :)
talk) 07:40, 22 January 2014 (EET)(
Influencer - yes
Basically it's the same process with resx files as with xaml and cs. You add the resources as link. You'll need a link to the LocalizedStrings class, too. The problem is just that you can't do special handling in the resources depending on a proproc define. HTH,Thomas
talk) 09:54, 22 January 2014 (EET)(
BuildNokia - Useful article
Hi Thomas and Manikanthr,
This article has the potential to be useful to a lot of people; especially as evidenced by the recent discussion about it, and by the fact that Manikanthr found the solution to his problem here.
I think that there is more we could add to this article to make it even more useful. First of all, I would broaden the scope; what you're really talking about here is sharing code and resources among different apps. So I would probably change the title to be something closer to what the discussion thread is called, maybe even the same thing "Performing code reuse in Windows Phone 8".
I might suggest structuring it as follows:
Introduction (and then merge "Problem Details" into this as well)
What type of data can be shared (code, resources, resx files) and what cannot (dataTemplates, styles)
For example it seems that you can't share code between WinRT and WP because they use different UIs.
Sharing code within the same namespace vs. sharing code between different namespaces
Referring to a child's resources vs. referring to a parent's resources - what are the differences?
Types of things that make code more reusable (using a pure MVVM implementation)
What might affect this (whether the apps share the same UI namespace)
Ways to reuse code
- Putting code in a separate assembly and referencing it
- Using Add as Link
- Implement a datasource in code that gives different strings for the different versions (you can use preproc defines here) or
- implement a value converter
- Using portable class libraries
- Using directives
For each method give instructions for how to do it, what kind of data this is best suited for, any kinds of data this is not suited for, and anything specific the developer should know.
Next, a "Case Study" section that shows the examples that are already in the wiki.
Finally, a "Resources" section that references:
Would either/both of you be willing to incorporate that feedback into the article?
talk) 02:33, 29 January 2014 (EET)(
Influencer - Will do...
I started researching articles and already found some very interesting links. Will write an overview when I'm ready.Thomas
talk) 19:40, 5 February 2014 (EET)(