WPF Infrastructure

MVVM

The basic pattern used in WPF applications of any complexity is to implement the individual windows as  code free views, and connect the window to the underlying model objects through a façade.

The façade exposes the actions and the data via a data binding interface and coordinates either the services that allow access to the data, or the command objects that so the task.

Main

The initial start of a WPF based application is defined by the app.xaml file, and any code in its code behind.

<Application x:Class="CharacterForms.App"
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 StartupUri="Views/MainWindow.xaml">
</Application>

In this case the startup xaml file (MainWindow.xaml) is in a subfolder/namespace called Views.

Leave a Reply