Click here to Skip to main content
15,905,148 members
Home / Discussions / WPF
   

WPF

 
QuestionWPF First Start Performance Pin
savbace14-Mar-13 2:16
savbace14-Mar-13 2:16 
AnswerRe: WPF First Start Performance Pin
Richard MacCutchan14-Mar-13 3:04
mveRichard MacCutchan14-Mar-13 3:04 
QuestionWPF MVVM application Pin
Member 878633514-Mar-13 1:49
Member 878633514-Mar-13 1:49 
AnswerRe: WPF MVVM application Pin
NotPolitcallyCorrect14-Mar-13 2:50
NotPolitcallyCorrect14-Mar-13 2:50 
AnswerRe: WPF MVVM application Pin
Wayne Gaylard14-Mar-13 7:53
professionalWayne Gaylard14-Mar-13 7:53 
AnswerRe: WPF MVVM application Pin
Abhinav S18-Mar-13 7:09
Abhinav S18-Mar-13 7:09 
AnswerRe: WPF MVVM application Pin
_Maxxx_1-Apr-13 19:52
professional_Maxxx_1-Apr-13 19:52 
Questionsilverlight file upload, error not displays on browser Pin
vpraveen12-Mar-13 21:30
vpraveen12-Mar-13 21:30 
AnswerRe: silverlight file upload, error not displays on browser Pin
Pete O'Hanlon12-Mar-13 21:52
mvePete O'Hanlon12-Mar-13 21:52 
GeneralRe: silverlight file upload, error not displays on browser Pin
vpraveen12-Mar-13 23:08
vpraveen12-Mar-13 23:08 
GeneralRe: silverlight file upload, error not displays on browser Pin
Pete O'Hanlon12-Mar-13 23:12
mvePete O'Hanlon12-Mar-13 23:12 
QuestionWpf form design Pin
vikas5515011-Mar-13 20:39
vikas5515011-Mar-13 20:39 
AnswerRe: Wpf form design Pin
Abhinav S11-Mar-13 21:29
Abhinav S11-Mar-13 21:29 
Questionerror MC4104? Pin
SledgeHammer0110-Mar-13 15:08
SledgeHammer0110-Mar-13 15:08 
QuestionPrism and FluidKit Pin
DXXL10-Mar-13 2:46
DXXL10-Mar-13 2:46 
QuestionWhat is best technology choice (WCF/WPF, WebSockets, Rest) to share webcam video amongst up to 8 users? Pin
Paga Cession9-Mar-13 16:57
Paga Cession9-Mar-13 16:57 
QuestionAuto complete text box problem Pin
columbos149277-Mar-13 19:50
columbos149277-Mar-13 19:50 
AnswerRe: Auto complete text box problem Pin
Richard Deeming8-Mar-13 1:25
mveRichard Deeming8-Mar-13 1:25 
QuestionWPF / MVVM - Modular Design Question Pin
Kevin Marois7-Mar-13 7:27
professionalKevin Marois7-Mar-13 7:27 
AnswerRe: WPF / MVVM - Modular Design Question Pin
SledgeHammer017-Mar-13 9:51
SledgeHammer017-Mar-13 9:51 
GeneralRe: WPF / MVVM - Modular Design Question Pin
Kevin Marois7-Mar-13 14:10
professionalKevin Marois7-Mar-13 14:10 
GeneralRe: WPF / MVVM - Modular Design Question Pin
SledgeHammer017-Mar-13 15:07
SledgeHammer017-Mar-13 15:07 
If you want to be all MVVMy, you would derive your child VMs from a common base class:

public ChildViewModel1 : ChildViewModelBase (which is derived from ViewModelBase or whatever)
{
}

public ChildViewModel2 : ChildViewModelBase
{
}

then in your MainWindowVM, you would have:

public ObservableCollection<ChildViewModelBase> ChildViews
{
}

in your MainWindowVM, if you wanted to open a view, you'd new up a ChildViewModel1 for example and stick it in the list. Closing a view by removing it, etc.

The MainViewView.xaml's TabControl ItemsSource would bind to the ChildViews prop. You can have a Title property in ChildViewBase that specifies the tab text.

You wouldn't use a ViewLocator in this implementation because you are going the other way. You only new up the VMs.

You would map the VM back to a view by defining DataTemplates that say for a type ChildViewModel1, I want to instantiate ChildView1 or whatever.

That doesn't happen automatically, so you'd either derive from TabControl or use an attached property where you monitor the TabControl ItemSource collection and look up the DataTemplate for the type of VM and new up the view and set its DataContext to the content of the tab (the VM) and then the tab's content to the view.

Very slick and MVVMy once you get it set up.
GeneralRe: WPF / MVVM - Modular Design Question Pin
Kevin Marois8-Mar-13 5:28
professionalKevin Marois8-Mar-13 5:28 
AnswerRe: WPF / MVVM - Modular Design Question Pin
Wayne Gaylard8-Mar-13 6:10
professionalWayne Gaylard8-Mar-13 6:10 
GeneralRe: WPF / MVVM - Modular Design Question Pin
Kevin Marois8-Mar-13 6:14
professionalKevin Marois8-Mar-13 6:14 

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.