1

I'm making a WPF application to configure data acquisition from different types of sensors using DAQ cards. My first window takes input from user regarding different parameters and I would like to use these in all my further windows. What is the best way to store all these.

  1. make a separate class and store them all as static fields in the class.
  2. store them in a string array in my mainwindow class.
1

2 Answers 2

2

If you can't follow any of the suggested patterns and you need some properties available across all the windows of your application, you can use the Application.Properties property.

http://msdn.microsoft.com/en-us/library/system.windows.application.properties

1

Tom Deleu is right, you should separate your view from your data. Caliburn.Micro is quite powerful and easy to learn too. Is also has quite a few users so any questions are likely to be solved. Whatever you choose, do it the right way.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.