Click here to Skip to main content
15,847,414 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: UserControls as Templates [modified] Pin
Mark Salsbery24-May-11 23:17
Mark Salsbery24-May-11 23:17 
GeneralRe: UserControls as Templates Pin
CodingLover25-May-11 0:03
CodingLover25-May-11 0:03 
GeneralRe: UserControls as Templates Pin
Mark Salsbery25-May-11 0:09
Mark Salsbery25-May-11 0:09 
GeneralRe: UserControls as Templates Pin
CodingLover25-May-11 0:35
CodingLover25-May-11 0:35 
QuestionHow to design using MVVM for a GUI interacting with Hardware Pin
Praveen Raghuvanshi24-May-11 8:39
professionalPraveen Raghuvanshi24-May-11 8:39 
AnswerRe: How to design using MVVM for a GUI interacting with Hardware [modified] Pin
Mark Salsbery24-May-11 10:08
Mark Salsbery24-May-11 10:08 
GeneralRe: How to design using MVVM for a GUI interacting with Hardware Pin
Praveen Raghuvanshi30-May-11 7:41
professionalPraveen Raghuvanshi30-May-11 7:41 
AnswerRe: How to design using MVVM for a GUI interacting with Hardware Pin
_Maxxx_24-May-11 21:57
professional_Maxxx_24-May-11 21: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 7:42
professionalPraveen Raghuvanshi30-May-11 7:42 
QuestionWPF/MVVM TextBox Width From DB Field Size Pin
Kevin Marois24-May-11 5:57
professionalKevin Marois24-May-11 5:57 
AnswerRe: WPF/MVVM TextBox Width From DB Field Size Pin
Pete O'Hanlon24-May-11 10:25
subeditorPete O'Hanlon24-May-11 10:25 
GeneralRe: WPF/MVVM TextBox Width From DB Field Size Pin
Kevin Marois24-May-11 13:58
professionalKevin Marois24-May-11 13:58 
GeneralRe: WPF/MVVM TextBox Width From DB Field Size Pin
SledgeHammer0124-May-11 14:36
SledgeHammer0124-May-11 14:36 
GeneralRe: WPF/MVVM TextBox Width From DB Field Size Pin
Pete O'Hanlon24-May-11 22:54
subeditorPete O'Hanlon24-May-11 22:54 
AnswerRe: WPF/MVVM TextBox Width From DB Field Size Pin
_Maxxx_24-May-11 22:22
professional_Maxxx_24-May-11 22:22 
QuestionChanging Image Source does not cause the image to be loaded Pin
Michael J. Eber23-May-11 11:58
Michael J. Eber23-May-11 11:58 
AnswerRe: Changing Image Source does not cause the image to be loaded Pin
SledgeHammer0123-May-11 12:18
SledgeHammer0123-May-11 12:18 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
Michael J. Eber23-May-11 12:39
Michael J. Eber23-May-11 12:39 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
Mycroft Holmes23-May-11 15:02
professionalMycroft Holmes23-May-11 15:02 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
SledgeHammer0123-May-11 15:05
SledgeHammer0123-May-11 15:05 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
Michael J. Eber26-May-11 11:31
Michael J. Eber26-May-11 11:31 
GeneralRe: Changing Image Source does not cause the image to be loaded Pin
Mycroft Holmes26-May-11 13:36
professionalMycroft Holmes26-May-11 13:36 
QuestionSilverlight - Saving a file without the dialog? Pin
dbrenth23-May-11 8:56
dbrenth23-May-11 8:56 
AnswerRe: Silverlight - Saving a file without the dialog? Pin
Michael J. Eber23-May-11 11:56
Michael J. Eber23-May-11 11:56 
GeneralRe: Silverlight - Saving a file without the dialog? Pin
Mycroft Holmes23-May-11 15:04
professionalMycroft Holmes23-May-11 15: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.