Relative Content

Tag Archive for mvvm

Add complex customization to form or create two forms?

I’m working in a WPF application that both imports and exports delimited text files. At both ends, there is a UserControl which encapsulates some logic about delimiter configuration. It has some controls for individually selecting delimiters, and a ‘Presets’ dropdown for quickly selecting certain common combinations such as CSV.

WPF, MVVM, EF, POCO guidance required on simple architecture

(sorry for my poor english)
I am developing a application using WPF, EF Code First using MVVM (Caliburn.Micro).
It should be used mostly to CRUD work. I created a BaseViewModel<T> class from wich all other ViewModels inherit and exposed a T Selected property to bind to the View. I know it is not recomended to expose a Model to the View but it just make things simple to get the app running.

MVVM – child windows and data contexts

Should a child window have it’s own data context (View-Model) or use the data context of the parent? More broadly, should each View have its own View-Model? Are there are any rules to guide making that decision? What if the various View-Models will be accessing the same Model?

Contract / Project / Line-Item hierarchy design considerations

We currently have an application that allows users to create a Contract. A contract can have 1 or more Project. A project can have 0 or more sub-projects (which can have their own sub-projects, and so on) as well as 1 or more Line. Lines can have any number of sub-lines (which can have their own sub-lines, and so on).

Distinguishing between UI command & domain commands

I am building a WPF client application using the MVVM pattern that provides an interface on top of an existing set of business logic residing in a library which is shared with other applications. The business library followed a domain-driven architecture using CQRS to separate the read and write models (no event sourcing). The combination of technologies and patterns has brought up an interesting conundrum: