Click here to Skip to main content
15,879,535 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Silverlight and subdomains Pin
Mark Salsbery27-May-11 13:45
Mark Salsbery27-May-11 13:45 
AnswerRe: Silverlight and subdomains Pin
Abhinav S26-May-11 7:52
Abhinav S26-May-11 7:52 
Question[SOLVED] UserControls as Templates Pin
CodingLover24-May-11 20:00
CodingLover24-May-11 20:00 
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 
Hi,

I am new to MVVM and trying to implement it in my application.
I have a develop a GUI which will interact with the Hardware through some protocol. This is first experience under this space.

Just to keep things simple, consider I have a hardware which contains Voltage and Resistance parameter at different sections of the hardware.

View
----
So, I have total 5 sections. Each of them contains 15 different Voltages and Resistance.

In my WPF GUI, I am representing these 5 sections in a tab control.
I have created a user control(PowerControl) that contains 2 sliders for Voltage and Resistance. Voltage varies from 0-120v and Resistance varies from 1-10 ohm.

Each of the sections in the tab control contains 15 user controls.

Model
-----
I am planning to create a class Power which has 2 properties for voltage and Resistance.

ViewModel
---------
I am planning to create a class 'PowerViewModel' to represent the Power model. It will have two properties which will have INotifyProperty changed event.

The change from the slider has to be conveyed to the hardware and it is done through a set of uniquely identified parameter.
Such as if a slider on the PowerControl of section 2(tab2) is moved, it 'll be represented as "PC2, section2, value of slider". So, its a combination of these three things and I used to send it the hardware which displays it in the hardware display.

Here are my questions.

1- Where should I write the unique ID's? Should it be in the Model or ViewModel?
2- How should we bind the slider as per their ID's?
3- How does my Model know which slider has been moved?
4- How can we apply MVVM here?

Thanks in advance and please feel free to ask for any clarification on this.
Praveen Raghuvanshi
Software Developer

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 
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 

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.