1
votes

In my Prism WPF modular application I need in the following common shared data: 1) Two strings with names of shell window' regions, 2) The ResourceDictionary with common style for radiobuttons (which are defined in modules). Below is the screenshot of my app window when it runs.

enter image description here

Below is the structure of modules in my application:

enter image description here

AuthorizationNavigationItemView.xaml and AuthorizationNavigationItemViewModel.cs are 'Athorization' radiobutton and its view model correspondingly. And CalibrationNavigationItemView.xaml and CalibrationNavigationItemViewModel.cs are 'Calibration' radiobutton and its view model correspondingly. Later on, the number of modules (and radiobuttons correspondingly) will reach up to 20 - 25 and all of them will need in common style placed in common ResourceDictionary. Besides this, all modules need in common resource - two strings that are the names of regions in the shell window: "MainNavigationRegion" and "MainContentRegion". Where should I place common ResourceDictionary and common string resource in my application? Your help will be appreciated highly.

1

1 Answers

0
votes

It depend on what you gonna do with this Resource file. Usually I separate to independent project all string/text resources. It because my app need localization, translation, etc.. so this file will be reviewed/changed by other people. So goes Styles and Templates resources - this for designers. Please note that designer usually re-build the project/solution in Blend or other tools so this resource project should take minimal reference to other project (ideally it should not reference anything else)

So - if you work in a team and other people will be manipulating the text/string/styles/etc.. in you app I suggest you create separate, independent project so other people could easily change it. Take in consideration that this project could come very late in delivery process so you should create some generic/invariant resource and use it untill 'real' file come in