c# - How to open a Dialog Window using MVVM -


can please me work out how open dialog window,

the simplest scenario can think of is: have main window button , label,

when user presses button,

a dialog window text box , 2 buttons appear,

one button says submit,

when user presses submit closes window,

it changes color of mainwindows background red,

and takes input placed in textbox , changes label on main window content(i bot worried part how part),

while other button cancels operation,

assume datacontext of mainwindow , dialogwindow mainwindowviewmodel , userinputviewmodel respectivily.

now on this link cameron talks using service, ie idialogservice , dialogservice please explain me how implement methods in scenario above? or if there way please let me know? please don't link me any pages because i've read them , can't seem clear understanding of meant happening? ~slowly loosing sanity because mvvm makes things harder :(

not answer, think i'll add pov anyway. how use dialogs in mvvm way, no 1 has managed in elegant fashion yet. there's 3 camps:
(1) people use dialogservice described,
(2) people thinks mvvm good, not should spent countless of hours trying right, use codebehind, and
(3) people me, thinks more not, dialog , parentview tied should share viewmodels (as-in, dialog one way of showing data viewmodel).


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -