Click here to Skip to main content
15,886,919 members
Home / Discussions / WPF
   

WPF

 
QuestionRe: How To Call A Method In A User Control Pin
Richard Deeming4-Aug-14 6:53
mveRichard Deeming4-Aug-14 6:53 
AnswerRe: How To Call A Method In A User Control Pin
Kevin Marois4-Aug-14 6:57
professionalKevin Marois4-Aug-14 6:57 
GeneralRe: How To Call A Method In A User Control Pin
Richard Deeming4-Aug-14 7:02
mveRichard Deeming4-Aug-14 7:02 
GeneralRe: How To Call A Method In A User Control Pin
Kevin Marois4-Aug-14 7:03
professionalKevin Marois4-Aug-14 7:03 
GeneralRe: How To Call A Method In A User Control Pin
Richard Deeming4-Aug-14 7:16
mveRichard Deeming4-Aug-14 7:16 
GeneralRe: How To Call A Method In A User Control Pin
SledgeHammer014-Aug-14 10:07
SledgeHammer014-Aug-14 10:07 
GeneralRe: How To Call A Method In A User Control Pin
Kevin Marois4-Aug-14 10:10
professionalKevin Marois4-Aug-14 10:10 
GeneralRe: How To Call A Method In A User Control Pin
SledgeHammer014-Aug-14 10:46
SledgeHammer014-Aug-14 10:46 
I meant, "leave the control" as in lose focus. If you want to execute on a Save button, that's a different story. There are a few ways to do it:

1) use a composite command and have the control attach to it

2) use messenger and send a message (p.s. this does not require a VM unless your messenger service is tightly coupled to ViewModelBase which it shouldn't be)

3) get a reference to the view in your viewmodel and reference the control directly

4) use a bindable property to trigger the validation (this is probably the cleanest way). I.e. in your save method:

ValidateControl = true;

the control would need to expose a DP and call Validate() when its set to true, then afterwards reset it to false.

Or, if you don't have control over the control, then an attached property would accomplish the same thing.
GeneralRe: How To Call A Method In A User Control Pin
Kevin Marois4-Aug-14 10:48
professionalKevin Marois4-Aug-14 10:48 
AnswerRe: How To Call A Method In A User Control Pin
_Maxxx_4-Aug-14 18:38
professional_Maxxx_4-Aug-14 18:38 
GeneralRe: How To Call A Method In A User Control Pin
SledgeHammer016-Aug-14 9:27
SledgeHammer016-Aug-14 9:27 
QuestionHow to send a fax using wpf? Pin
Kesavanksk24-Jul-14 23:41
Kesavanksk24-Jul-14 23:41 
AnswerRe: How to send a fax using wpf? Pin
Pete O'Hanlon25-Jul-14 0:54
mvePete O'Hanlon25-Jul-14 0:54 
GeneralRe: How to send a fax using wpf? Pin
Mycroft Holmes25-Jul-14 14:31
professionalMycroft Holmes25-Jul-14 14:31 
AnswerRe: How to send a fax using wpf? Pin
Afzaal Ahmad Zeeshan15-Aug-14 6:46
professionalAfzaal Ahmad Zeeshan15-Aug-14 6:46 
QuestionUnable to access DatePicker's SelectedDate property Pin
Suj_7822-Jul-14 3:26
Suj_7822-Jul-14 3:26 
AnswerRe: Unable to access DatePicker's SelectedDate property Pin
SledgeHammer0123-Jul-14 5:14
SledgeHammer0123-Jul-14 5:14 
QuestionProblème with TreeView Pin
Mouaici Mohamed22-Jul-14 1:38
Mouaici Mohamed22-Jul-14 1:38 
AnswerRe: Problème with TreeView Pin
Mycroft Holmes23-Jul-14 1:08
professionalMycroft Holmes23-Jul-14 1:08 
GeneralRe: Problème with TreeView Pin
Mouaici Mohamed23-Jul-14 1:14
Mouaici Mohamed23-Jul-14 1:14 
GeneralRe: Problème with TreeView Pin
Mycroft Holmes23-Jul-14 3:00
professionalMycroft Holmes23-Jul-14 3:00 
QuestionPass a window to a dialog as owner Pin
Mycroft Holmes21-Jul-14 22:54
professionalMycroft Holmes21-Jul-14 22:54 
AnswerRe: Pass a window to a dialog as owner Pin
SledgeHammer0122-Jul-14 4:55
SledgeHammer0122-Jul-14 4:55 
GeneralRe: Pass a window to a dialog as owner Pin
Mycroft Holmes23-Jul-14 1:06
professionalMycroft Holmes23-Jul-14 1:06 
QuestionPass selection to container Pin
Mycroft Holmes15-Jul-14 21:55
professionalMycroft Holmes15-Jul-14 21:55 

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.