Click here to Skip to main content
15,893,161 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: No experience, learning C# & WPF Pin
Pete O'Hanlon30-Mar-10 21:48
mvePete O'Hanlon30-Mar-10 21:48 
GeneralRe: No experience, learning C# & WPF Pin
Jammer1-Apr-10 14:17
Jammer1-Apr-10 14:17 
GeneralRe: No experience, learning C# & WPF Pin
Pete O'Hanlon2-Apr-10 10:02
mvePete O'Hanlon2-Apr-10 10:02 
GeneralRe: No experience, learning C# & WPF Pin
Jammer12-Apr-10 10:52
Jammer12-Apr-10 10:52 
GeneralRe: No experience, learning C# & WPF Pin
Jammer1-Apr-10 14:09
Jammer1-Apr-10 14:09 
GeneralRe: No experience, learning C# & WPF Pin
tim.gent@gmail.com2-Apr-10 0:22
tim.gent@gmail.com2-Apr-10 0:22 
GeneralRe: No experience, learning C# & WPF Pin
Jammer2-Apr-10 6:06
Jammer2-Apr-10 6:06 
QuestionMVVM Pin
DoctorMick30-Mar-10 4:30
DoctorMick30-Mar-10 4:30 
Hello all,

I'm fairly new to Silverlight and MVVM and I'm struggling with the correct way of doing the simple task of changing the top level silverlight view. Using Silverlight 4 commanding I am binding a command on my view model to a login button on my main form and then calling an authentication service to ensure the credentials are valid, this is working and I can authenticate the user. What I am struggling with is the best way of closing the login screen and displaying another screen when I get a successful response from my service. From what I understand you cannot hook a callback event in the view to a command object and I should also be trying to avoid having any code behind in the view so where do I control the opening of a new view? Obviously, my ViewModel should know nothing about the view so I can't do it there, can I?

The way I was going to approach it is still use the button bound to a command on the view model but use a bit of code in the view to hook an event to the view model which is fired when I get the successful login from the service. The event hooked up in the view would then control switching the views but from the examples I have looked at I am not convinced this is the best way forward.

Am I missing something obvious or looking at the problem in completely the wrong way?

I'm hopeful this question will have a straight forward answer but after hours of browing examples on the web I'm still none the wiser as to the correct approach.
AnswerRe: MVVM Pin
Abhinav S30-Mar-10 4:42
Abhinav S30-Mar-10 4:42 
QuestionCustom user control binding Pin
Joe Rozario29-Mar-10 18:42
Joe Rozario29-Mar-10 18:42 
AnswerRe: Custom user control binding [modified] Pin
Parwej Ahamad30-Mar-10 3:46
professionalParwej Ahamad30-Mar-10 3:46 
GeneralRe: Custom user control binding Pin
Joe Rozario31-Mar-10 17:58
Joe Rozario31-Mar-10 17:58 
GeneralRe: Custom user control binding Pin
Parwej Ahamad31-Mar-10 18:16
professionalParwej Ahamad31-Mar-10 18:16 
GeneralRe: Custom user control binding Pin
Parwej Ahamad31-Mar-10 18:23
professionalParwej Ahamad31-Mar-10 18:23 
GeneralRe: Custom user control binding Pin
Parwej Ahamad31-Mar-10 18:55
professionalParwej Ahamad31-Mar-10 18:55 
GeneralRe: Custom user control binding Pin
Joe Rozario31-Mar-10 21:00
Joe Rozario31-Mar-10 21:00 
AnswerRe: Custom user control binding Pin
Super Lloyd31-Mar-10 18:09
Super Lloyd31-Mar-10 18:09 
QuestionStrange window is shown every time i save a silverlight project Pin
jonatan_55629-Mar-10 0:51
jonatan_55629-Mar-10 0:51 
AnswerRe: Strange window is shown every time i save a silverlight project Pin
Abhinav S29-Mar-10 7:12
Abhinav S29-Mar-10 7:12 
GeneralRe: Strange window is shown every time i save a silverlight project Pin
jonatan_55629-Mar-10 22:27
jonatan_55629-Mar-10 22:27 
GeneralRe: Strange window is shown every time i save a silverlight project Pin
Abhinav S30-Mar-10 3:52
Abhinav S30-Mar-10 3:52 
QuestionTo generate Text boxes, Combo boxes, IP Address controls at runtime Pin
luckyshah29-Mar-10 0:32
luckyshah29-Mar-10 0:32 
AnswerRe: To generate Text boxes, Combo boxes, IP Address controls at runtime [modified] Pin
Parwej Ahamad29-Mar-10 9:49
professionalParwej Ahamad29-Mar-10 9:49 
GeneralRe: To generate Text boxes, Combo boxes, IP Address controls at runtime Pin
luckyshah29-Mar-10 22:02
luckyshah29-Mar-10 22:02 
QuestionBinding Double click Pin
Joe Rozario28-Mar-10 23:18
Joe Rozario28-Mar-10 23:18 

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.