Click here to Skip to main content
15,845,330 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 7:56
professionalKevin Marois30-Dec-13 7:56 
GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 8:06
professionalKevin Marois30-Dec-13 8:06 
GeneralRe: WPF DialogService Question Pin
Ron Beyer30-Dec-13 8:22
professionalRon Beyer30-Dec-13 8:22 
GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 8:22
professionalKevin Marois30-Dec-13 8:22 
GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 8:35
professionalKevin Marois30-Dec-13 8:35 
GeneralRe: WPF DialogService Question Pin
Ron Beyer30-Dec-13 8:46
professionalRon Beyer30-Dec-13 8:46 
GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 8:53
professionalKevin Marois30-Dec-13 8:53 
GeneralRe: WPF DialogService Question Pin
Ron Beyer30-Dec-13 9:03
professionalRon Beyer30-Dec-13 9:03 
I figured that your model derives from a base type, you can have an object in the model to store any return value (or you could just store the entire view model if you want).

I don't know where you would store the return value in the view model, so I put a placeholder there. You didn't really specify where this would be stored, but I assume you have a field in the model that you can store return data in.

I would put a virtual field in the viewmodel base class (returns null by default) that the derived classes can override to return whatever.

For example:

C#
public abstract class _DialogBaseViewModel
{
    public virtual object DialogData { get { return null; } }
}


Then a derived class could write:

C#
public class InputDialogViewModel : _DialogBaseViewModel
{
    private string _textData = string.Empty;

    public override object DialogData
    {
        get
        {
            return _textData;
        }
    }
}

GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 9:08
professionalKevin Marois30-Dec-13 9:08 
GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 9:45
professionalKevin Marois30-Dec-13 9:45 
GeneralRe: WPF DialogService Question Pin
Ron Beyer30-Dec-13 9:54
professionalRon Beyer30-Dec-13 9:54 
GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 10:18
professionalKevin Marois30-Dec-13 10:18 
GeneralRe: WPF DialogService Question Pin
Ron Beyer30-Dec-13 11:25
professionalRon Beyer30-Dec-13 11:25 
GeneralRe: WPF DialogService Question Pin
Kevin Marois30-Dec-13 11:28
professionalKevin Marois30-Dec-13 11:28 
GeneralRe: WPF DialogService Question Pin
Kevin Marois31-Dec-13 6:54
professionalKevin Marois31-Dec-13 6:54 
GeneralRe: WPF DialogService Question Pin
Ron Beyer31-Dec-13 7:09
professionalRon Beyer31-Dec-13 7:09 
GeneralRe: WPF DialogService Question Pin
Mycroft Holmes6-Jan-14 22:57
professionalMycroft Holmes6-Jan-14 22:57 
QuestionConvert BitmapImage into byte arrays in wpf Pin
Member 1001614027-Dec-13 1:23
Member 1001614027-Dec-13 1:23 
AnswerRe: Convert BitmapImage into byte arrays in wpf Pin
Pete O'Hanlon27-Dec-13 1:58
subeditorPete O'Hanlon27-Dec-13 1:58 
GeneralRe: Convert BitmapImage into byte arrays in wpf Pin
Member 1001614027-Dec-13 4:44
Member 1001614027-Dec-13 4:44 
QuestionWPF App Content Presenter in Main Window Pin
Kevin Marois23-Dec-13 8:21
professionalKevin Marois23-Dec-13 8:21 
AnswerRe: WPF App Content Presenter in Main Window Pin
SledgeHammer0123-Dec-13 11:22
SledgeHammer0123-Dec-13 11:22 
GeneralRe: WPF App Content Presenter in Main Window Pin
Kevin Marois3-Jan-14 11:29
professionalKevin Marois3-Jan-14 11:29 
QuestionHow to add certificate in Local Machine Pin
Sugu.s19-Dec-13 23:50
Sugu.s19-Dec-13 23:50 
QuestionWPF user control not working Pin
sridhar chanti18-Dec-13 3:33
sridhar chanti18-Dec-13 3:33 

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.