Click here to Skip to main content
15,884,628 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: UserControls as Templates [modified] Pin
Mark Salsbery24-May-11 22:17
Mark Salsbery24-May-11 22:17 
GeneralRe: UserControls as Templates Pin
CodingLover24-May-11 23:03
CodingLover24-May-11 23:03 
GeneralRe: UserControls as Templates Pin
Mark Salsbery24-May-11 23:09
Mark Salsbery24-May-11 23:09 
GeneralRe: UserControls as Templates Pin
CodingLover24-May-11 23:35
CodingLover24-May-11 23:35 
QuestionHow to design using MVVM for a GUI interacting with Hardware Pin
Praveen Raghuvanshi24-May-11 7:39
professionalPraveen Raghuvanshi24-May-11 7:39 
AnswerRe: How to design using MVVM for a GUI interacting with Hardware [modified] Pin
Mark Salsbery24-May-11 9:08
Mark Salsbery24-May-11 9:08 
GeneralRe: How to design using MVVM for a GUI interacting with Hardware Pin
Praveen Raghuvanshi30-May-11 6:41
professionalPraveen Raghuvanshi30-May-11 6:41 
AnswerRe: How to design using MVVM for a GUI interacting with Hardware Pin
_Maxxx_24-May-11 20:57
professional_Maxxx_24-May-11 20:57 
For MVVM you're kinda doing it the wrong way around - you should create your VM first and then design a view. Anyhow, I know lots of people work better visually, so:

You have five sections each with a collection of 'Voltages and resistances'

So you want a SectionViewModel that contains a collection of VoltageAndResistanceViewModels - each of which has a Voltage property and a resistance property -which utilise INotifyPropertyChanged

Then you want another ViewModel that contains a collection of the SectionViewModel

I'd say that when you instantiate each of your ViewModels you'd need to tell them which unique Id for the hardware they are representing. This information (I would htink) would be contained in the model as a series fo collectins - so you would construct your collection of ViewModels based upon these collections, hence the Model has the unique Ids, which are referenced by the viewModels

Each slider would be bound in Xaml to the appropriate property of the particular VM to which the View is bound

When the property of the Vm is changed, if necessary that's the time to adjust the property on the model - the model can then do whatever it does in order to update the machine's value.

Hope that helps at least a little!
MVVM# - See how I did MVVM my way
___________________________________________

.\\axxx
(That's an 'M')

GeneralRe: How to design using MVVM for a GUI interacting with Hardware Pin
Praveen Raghuvanshi30-May-11 6:42
professionalPraveen Raghuvanshi30-May-11 6:42 
QuestionWPF/MVVM TextBox Width From DB Field Size Pin
Kevin Marois24-May-11 4:57
professionalKevin Marois24-May-11 4:57 
AnswerRe: WPF/MVVM TextBox Width From DB Field Size Pin
Pete O'Hanlon24-May-11 9:25
mvePete O'Hanlon24-May-11 9:25 
GeneralRe: WPF/MVVM TextBox Width From DB Field Size Pin
Kevin Marois24-May-11 12:58
professionalKevin Marois24-May-11 12:58 
GeneralRe: WPF/MVVM TextBox Width From DB Field Size Pin
SledgeHammer0124-May-11 13:36
SledgeHammer0124-May-11 13:36 
GeneralRe: WPF/MVVM TextBox Width From DB Field Size Pin
Pete O'Hanlon24-May-11 21:54
mvePete O'Hanlon24-May-11 21:54 
AnswerRe: WPF/MVVM TextBox Width From DB Field Size Pin
_Maxxx_24-May-11 21:22
professional_Maxxx_24-May-11 21:22 
QuestionChanging Image Source does not cause the image to be loaded Pin
Michael J. Eber23-May-11 10:58
Michael J. Eber23-May-11 10:58 
AnswerRe: Changing Image Source does not cause the image to be loaded Pin
SledgeHammer0123-May-11 11:18
SledgeHammer0123-May-11 11:18 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
Michael J. Eber23-May-11 11:39
Michael J. Eber23-May-11 11:39 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
Mycroft Holmes23-May-11 14:02
professionalMycroft Holmes23-May-11 14:02 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
SledgeHammer0123-May-11 14:05
SledgeHammer0123-May-11 14:05 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
Michael J. Eber26-May-11 10:31
Michael J. Eber26-May-11 10:31 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
Mycroft Holmes26-May-11 12:36
professionalMycroft Holmes26-May-11 12:36 
QuestionSilverlight - Saving a file without the dialog? Pin
dbrenth23-May-11 7:56
dbrenth23-May-11 7:56 
AnswerRe: Silverlight - Saving a file without the dialog? Pin
Michael J. Eber23-May-11 10:56
Michael J. Eber23-May-11 10:56 
GeneralRe: Silverlight - Saving a file without the dialog? Pin
Mycroft Holmes23-May-11 14:04
professionalMycroft Holmes23-May-11 14:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.