Click here to Skip to main content
15,915,083 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Async threading with Silver-light Pin
1 317-Sep-10 2:04
1 317-Sep-10 2:04 
GeneralRe: Async threading with Silver-light Pin
1 317-Sep-10 2:10
1 317-Sep-10 2:10 
GeneralRe: Async threading with Silver-light Pin
#realJSOP17-Sep-10 2:42
professional#realJSOP17-Sep-10 2:42 
QuestionMoving control should stay within the bounds of the form? [modified] Pin
Jibrohni16-Sep-10 4:13
Jibrohni16-Sep-10 4:13 
QuestionHow do I tell why events aren't firing Pin
RugbyLeague16-Sep-10 2:49
RugbyLeague16-Sep-10 2:49 
AnswerRe: How do I tell why events aren't firing Pin
RugbyLeague16-Sep-10 5:42
RugbyLeague16-Sep-10 5:42 
GeneralRe: How do I tell why events aren't firing Pin
Pete O'Hanlon16-Sep-10 6:44
mvePete O'Hanlon16-Sep-10 6:44 
GeneralRe: How do I tell why events aren't firing Pin
RugbyLeague16-Sep-10 10:10
RugbyLeague16-Sep-10 10:10 
GeneralRe: How do I tell why events aren't firing Pin
Pete O'Hanlon16-Sep-10 10:13
mvePete O'Hanlon16-Sep-10 10:13 
QuestionRibbon Control - Workspace areas Pin
Sevententh14-Sep-10 23:16
Sevententh14-Sep-10 23:16 
QuestionRe: Ribbon Control - Workspace areas Pin
Sevententh15-Sep-10 0:25
Sevententh15-Sep-10 0:25 
QuestionWire up an event from a helper class Pin
Mycroft Holmes14-Sep-10 16:43
professionalMycroft Holmes14-Sep-10 16:43 
GeneralRe: Wire up an event from a helper class Pin
Mycroft Holmes15-Sep-10 12:08
professionalMycroft Holmes15-Sep-10 12:08 
QuestionEvents between user controls Pin
David_ml_G14-Sep-10 9:35
David_ml_G14-Sep-10 9:35 
AnswerRe: Events between user controls Pin
AspDotNetDev14-Sep-10 10:18
protectorAspDotNetDev14-Sep-10 10:18 
QuestionRe VS2003 error Pin
Ajay Kale New13-Sep-10 17:32
Ajay Kale New13-Sep-10 17:32 
AnswerRe: Re VS2003 error Pin
Pete O'Hanlon13-Sep-10 22:26
mvePete O'Hanlon13-Sep-10 22:26 
AnswerRe: Re VS2003 error Pin
Abhinav S19-Sep-10 19:57
Abhinav S19-Sep-10 19:57 
QuestionGetting the size of a control Pin
WebMaster13-Sep-10 9:47
WebMaster13-Sep-10 9:47 
QuestionRe: Getting the size of a control Pin
PumbaPumba27-Sep-10 6:44
PumbaPumba27-Sep-10 6:44 
QuestionMVVM and the ViewModelLocator Pin
Mycroft Holmes11-Sep-10 23:36
professionalMycroft Holmes11-Sep-10 23:36 
I'm struggling to identify the correct way to move from one control to another using MVVM. I have implemented the navigation framework and MVVMLight. UserVM is the viewmodel and it is a static property the ViewModelLocator
public static UserDetailsVM UserDetailsVMStatic
{
    get
    {
        if (_UserDetailsVM == null)
        {
            CreateUserDetailsVM();
        }
        return _UserDetailsVM;
    }
}



So I have a control with a list of users in a datagrid, the user clicks on the hyperlinkbutton and navigates to the details form. The ID is correctly passed via the navigation but I'm not using it yet as I expect to use the existing VM.

The details control binds to the static VM and should show the selected user details from the datagid control (this works within the same page).

This control binding does not return the selected user details but the FIRST users details.
DataContext="{Binding UserDetailsVMStatic, Source={StaticResource Locator}}" 


The textbox binding should show the user details of the selected user from the list page
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding EditableUserDetails.Email, Mode=TwoWay}"/>


Except I already have a VM created to service the datagrid control and it has the selected item in a property.

How can I use the existing VM in the details form.
Do I have to chase through the staticresource dictionary to get the VM from the locator or is there a way to do this in XAML.
Never underestimate the power of human stupidity
RAH

AnswerRe: MVVM and the ViewModelLocator - Solved Pin
Mycroft Holmes14-Sep-10 16:06
professionalMycroft Holmes14-Sep-10 16:06 
QuestionWPF custom control DepencyProperty Pin
wpfcomputer11-Sep-10 9:12
wpfcomputer11-Sep-10 9:12 
AnswerRe: WPF custom control DepencyProperty Pin
Abhishek Sur11-Sep-10 10:54
professionalAbhishek Sur11-Sep-10 10:54 
GeneralRe: WPF custom control DepencyProperty Pin
wpfcomputer11-Sep-10 11:26
wpfcomputer11-Sep-10 11:26 

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.