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

WPF

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

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.