MSDN > Home page del forum > Visual Studio WPF Designer > How can I access control from View inside ViewModel?
Formula una domandaFormula una domanda
 

DomandaHow can I access control from View inside ViewModel?

  • mercoledì 24 giugno 2009 13.14kunal2383 Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi,

    I am using WPF 3.5. I am newbie to MVVM.

    I created a sample application in WPF MVVM model.
    I want to access my usercontrol/properties which are available inside my View from the ViewModel.
    I didn't find any way. I tried it lot.

    Can anyone please help me to resolve it? I need the way asap.


    (Please mark as Answer, if this resolved your query. Thanks...) Regards, -- Kunal Chowdhury (My Blog)

Tutte le risposte

  • venerdì 26 giugno 2009 4.45MubaragALi Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    Hi microsoft-kc,

    I would like to know some of the things for my understandings,

    1. you want to access usercontrol in the sense, are you going to bind values to the controls ?

    If you want to bind any controls in the usercontrol, then you can set those values to any properties in ViewModel and bind through XAML.
    Or else if you want to simply set any values for your usercontrol properties, then you can do all the stuffs in xaml code itself.

     

    Thanks, Mubarag Ali
  • martedì 30 giugno 2009 0.43Mark Wilson-ThomasMSFT, ModeratoreMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

    Hi All

    This forum is for discussions about the WPF and Silverlight designers in Visual Studio.

    Since this is more of a platform discussion, it might get better answers at http://social.msdn.microsoft.com/Forums/en-US/wpf

    Thanks
    Mark


    Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'