Click here to Skip to main content
15,881,172 members
Articles / Desktop Programming / WPF

Introducing Apex

Rate me:
Please Sign up or sign in to vote.
4.80/5 (23 votes)
2 Aug 2011CPOL10 min read 56.8K   1.5K   57  
Introducing Apex - a lightweight MVVM and utility library for WPF, Silverlight, and WP7.
<Window x:Class="MVVMSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:MVVMSample"
        Title="MainWindow" Height="200" Width="300">
    
    <!-- The datacontext for the window is an instance of our viewmodel. -->
    <Window.DataContext>
        <local:MainViewModel x:Name="viewModel" />
    </Window.DataContext>
    
    <Grid>
        <StackPanel>
            <TextBlock Text="First Name" />
            <TextBox Margin="4" Text="{Binding FirstName, UpdateSourceTrigger=PropertyChanged}" />
            <TextBlock Text="Second Name" />
            <TextBox Margin="4" Text="{Binding SecondName, UpdateSourceTrigger=PropertyChanged}" />
            <Button Margin="4" Width="80" Content="Build Name" Command="{Binding BuildNameCommand}" />
            <TextBox Margin="4" Text="{Binding FullName}" />
        </StackPanel>
    </Grid>
</Window>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United Kingdom United Kingdom
Follow my blog at www.dwmkerr.com and find out about my charity at www.childrenshomesnepal.org.

Comments and Discussions