software master at the intersection of technology, science and art




XAML, Extensible Application Markup Language, is a delarative markup language. As applied to WPF, XAML simplifies the creating of a UI and separation of the run-time code behind which is bound to the mark-up through partial class definitions, i.e. models. It is the basis of the model-view-model architecture. XAML markup also creates a tree architecture for the processing of events - up the tree to the parents and then back down through the children which facilitates propogation of events. XAML looks very simial to XML - this is only a visual likeness. XAML code behind contians data-binding which can be one-way and two-way. This is a Separation of Concerns.


<StackPanel Orientation="Horizontal" Margin="0,15,0,0">
    <Label>Select </Label>
    <ComboBox Name="SelectCombo"ItemsSource="{Binding Path=BodyList}" DisplayMemberPath="BodySubPage" SelectedValue="{Binding Path=SubPageRef}" Width="200"></ComboBox>

The above example demonstrates not only the form but the syntax for binding the UI COmbo Box to a code behind structure. For detail examples of code with increased complexity see the kmf link and the files available for download.