Click here to Skip to main content
15,920,896 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Add Path To ItemsControl In Code Behind Pin
Pete O'Hanlon8-Sep-17 21:40
mvePete O'Hanlon8-Sep-17 21:40 
QuestionLearning WPF Pin
Simon_Whale8-Sep-17 0:05
Simon_Whale8-Sep-17 0:05 
AnswerRe: Learning WPF Pin
Richard MacCutchan8-Sep-17 5:17
mveRichard MacCutchan8-Sep-17 5:17 
AnswerRe: Learning WPF Pin
Mycroft Holmes8-Sep-17 13:18
professionalMycroft Holmes8-Sep-17 13:18 
GeneralRe: Learning WPF Pin
Simon_Whale11-Sep-17 1:42
Simon_Whale11-Sep-17 1:42 
QuestionShape Designer Pin
Kevin Marois23-Aug-17 6:47
professionalKevin Marois23-Aug-17 6:47 
AnswerRe: Shape Designer Pin
Gerry Schmitz23-Aug-17 7:06
mveGerry Schmitz23-Aug-17 7:06 
GeneralRe: Shape Designer Pin
Kevin Marois23-Aug-17 7:06
professionalKevin Marois23-Aug-17 7:06 
GeneralRe: Shape Designer Pin
Gerry Schmitz24-Aug-17 5:41
mveGerry Schmitz24-Aug-17 5:41 
GeneralRe: Shape Designer Pin
Kevin Marois24-Aug-17 5:42
professionalKevin Marois24-Aug-17 5:42 
GeneralRe: Shape Designer Pin
Gerry Schmitz24-Aug-17 6:07
mveGerry Schmitz24-Aug-17 6:07 
GeneralRe: Shape Designer Pin
Kevin Marois24-Aug-17 6:11
professionalKevin Marois24-Aug-17 6:11 
GeneralRe: Shape Designer Pin
Gerry Schmitz24-Aug-17 6:35
mveGerry Schmitz24-Aug-17 6:35 
GeneralRe: Shape Designer Pin
Kevin Marois24-Aug-17 6:42
professionalKevin Marois24-Aug-17 6:42 
GeneralRe: Shape Designer Pin
Kevin Marois24-Aug-17 12:37
professionalKevin Marois24-Aug-17 12:37 
GeneralRe: Shape Designer Pin
Gerry Schmitz9-Sep-17 13:17
mveGerry Schmitz9-Sep-17 13:17 
AnswerRe: Shape Designer Pin
Pete O'Hanlon24-Aug-17 22:07
mvePete O'Hanlon24-Aug-17 22:07 
Questiondatagrid multiple selected items Pin
Member 1328589316-Aug-17 23:15
Member 1328589316-Aug-17 23:15 
AnswerRe: datagrid multiple selected items Pin
Pete O'Hanlon17-Aug-17 0:43
mvePete O'Hanlon17-Aug-17 0:43 
GeneralRe: datagrid multiple selected items Pin
Member 1328589317-Aug-17 18:50
Member 1328589317-Aug-17 18:50 
AnswerRe: datagrid multiple selected items Pin
Mycroft Holmes17-Aug-17 21:02
professionalMycroft Holmes17-Aug-17 21:02 
QuestionComboBox Items Not Showing Up Pin
Kevin Marois7-Aug-17 5:28
professionalKevin Marois7-Aug-17 5:28 
AnswerRe: ComboBox Items Not Showing Up Pin
Mycroft Holmes7-Aug-17 15:22
professionalMycroft Holmes7-Aug-17 15:22 
GeneralRe: ComboBox Items Not Showing Up Pin
Kevin Marois8-Aug-17 4:51
professionalKevin Marois8-Aug-17 4:51 
GeneralRe: ComboBox Items Not Showing Up Pin
Kevin Marois8-Aug-17 5:33
professionalKevin Marois8-Aug-17 5:33 
Well I just figured it out...

The MainWindowView has
<DataTemplate DataType="{x:Type vms:MyViewModel}">
    <vw:MyView/>
</DataTemplate>

The VM's are based off a subclass that has a Load method. In the MainWindowViewModel when a view is selected I create MyViewModel and call the Load, which does
private void LoadClientsList()
{
    var clients = _dal.GetClients();
    Clients = new ObservableCollection<ClientEntity>(clients);
}

This all worked fine.

I just found this in MyView:
<UserControl.DataContext>
    <vms:BacklogViewModel/>
</UserControl.DataContext>

This second call was recreating the VM, so the Clients collection was reset to null;
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

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.