|I have a construction management app that is used to manage house framing. The client now want to use it to manage finish work, such as doors and cabinets, etc. The structure of the data is very similar - almost identical, and functionally the app would work the same with a few one-off views for each. My thought is that when the user logs in, they would now also pick which company they want to work in.
The question is this... There are going to be some TextBlocks that will need to be changed depending on what company the user is in. For example, the word "Project" might need to say "Task" depending on the company.
One idea I'm tossing around is to store these words in a resources file, something like:
<data name="a_project_caption" xml:space="preserve">
<data name="b_project_caption" xml:space="preserve">
Next, in the XAML I would have something like a behavior maybe?:
<TextBlock Tag="project_caption" beh:ResolveCaption/>
The behavior takes the value in the Tag and sets the textblock's text based on what it finds in the resource file, and throws if it can't resolve it.
I'm open to suggestions on this.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
modified 14-May-21 16:58pm.