Click here to Skip to main content
15,886,547 members
Articles / Web Development / ASP.NET

Take MVC to the Next Level in .NET

Rate me:
Please Sign up or sign in to vote.
4.62/5 (11 votes)
30 Apr 2013GPL315 min read 73.1K   858   75  
How to quickly build reusable and flexible WPF, Silverlight, or ASP.NET applications with the powerful Xomega Framework using the best MVVM principles.
<Window xmlns:xom="clr-namespace:Xomega.Framework;assembly=Xomega.Framework"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:l="clr-namespace:MyProject4.Client.Objects;assembly=MyProject4.Client.Objects"
        x:Class="MyProject4.Client.WPF.StoreReadListForm"
        Title="Store ReadList Form"
        Height="640"
        Width="960">
   <Grid Margin="10">
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto"/>
         <RowDefinition Height="Auto"/>
         <RowDefinition Height="*"/>
         <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <Grid Name="pnlCriteria">
         <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
         </Grid.RowDefinitions>
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
         </Grid.ColumnDefinitions>
         <Label Grid.Row="0" Grid.Column="0" Name="lblCustomer">_Customer:</Label>
         <ListBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3"
                  xom:Property.Label="{Binding ElementName=lblCustomer}"
                  Name="ctlCustomer"
                  xom:Property.Name="{x:Static l:StoreCriteria.Customer}"
                  Style="{StaticResource ControlStyle}"
                  MaxHeight="58"/>
         <Label Grid.Row="1" Grid.Column="0" Name="lblCustomerId">_Customer Id:</Label>
         <TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3"
                  xom:Property.Label="{Binding ElementName=lblCustomerId}"
                  Name="ctlCustomerId"
                  xom:Property.Name="{x:Static l:StoreCriteria.Customer}"
                  Style="{StaticResource ControlStyle}"/>
         <Label Grid.Row="0" Grid.Column="4" Name="lblCreatedDateFrom">_Created Date From:</Label>
         <TextBox Grid.Row="0" Grid.Column="5" Grid.ColumnSpan="3"
                  xom:Property.Label="{Binding ElementName=lblCreatedDateFrom}"
                  Name="ctlCreatedDateFrom"
                  xom:Property.Name="{x:Static l:StoreCriteria.CreatedDateFrom}"
                  Style="{StaticResource ControlStyle}"/>
         <Label Grid.Row="1" Grid.Column="4" Name="lblCreatedDateTo">_Created Date To:</Label>
         <TextBox Grid.Row="1" Grid.Column="5" Grid.ColumnSpan="3"
                  xom:Property.Label="{Binding ElementName=lblCreatedDateTo}"
                  Name="ctlCreatedDateTo"
                  xom:Property.Name="{x:Static l:StoreCriteria.CreatedDateTo}"
                  Style="{StaticResource ControlStyle}"/>
      </Grid>
      <Button Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Top"
              Margin="0,10,100,10"
              Name="btnSearch"
              Width="75"
              Click="btnSearch_Click">_Search</Button>
      <Button Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Top"
              Margin="0,10,0,10"
              Name="btnReset"
              Width="75"
              Click="btnReset_Click">_Reset</Button>
      <Button Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Top"
              Margin="0,10,0,10"
              Name="btnNew"
              Width="75">_New...</Button>
      <Button Grid.Row="3" HorizontalAlignment="Right" VerticalAlignment="Top"
              Margin="0,10,100,10"
              Name="btnDetails"
              Width="75">_Details...</Button>
      <Button Grid.Row="3" HorizontalAlignment="Right" VerticalAlignment="Top"
              Margin="0,10,0,10"
              Name="btnClose"
              Width="75"
              Click="btnClose_Click">_Close</Button>
      <ListView Grid.Row="2" Name="gridResults">
         <ListView.View>
            <GridView>
               <GridView.Columns>
                  <GridViewColumn Header="Customer Id">
                     <GridViewColumn.CellTemplate>
                        <DataTemplate>
                           <TextBlock xom:Property.Name="{x:Static l:StoreRowObject.CustomerId}"/>
                        </DataTemplate>
                     </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                  <GridViewColumn Header="Name">
                     <GridViewColumn.CellTemplate>
                        <DataTemplate>
                           <TextBlock xom:Property.Name="{x:Static l:StoreRowObject.Name}"/>
                        </DataTemplate>
                     </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                  <GridViewColumn Header="Sales Person Id">
                     <GridViewColumn.CellTemplate>
                        <DataTemplate>
                           <TextBlock xom:Property.Name="{x:Static l:StoreRowObject.SalesPersonId}"/>
                        </DataTemplate>
                     </GridViewColumn.CellTemplate>
                  </GridViewColumn>
               </GridView.Columns>
            </GridView>
         </ListView.View>
      </ListView>
   </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 GNU General Public License (GPLv3)


Written By
Architect Xomega.Net
United States United States
Xomega Team is striving to increase productivity and development quality by utilizing Model Driven Development coupled with Code Generation and the best design practices for application development.
We provide MDD tools, code generators and frameworks for Visual Studio and .Net development.
Visit us at http://www.xomega.net
This is a Organisation

1 members

Comments and Discussions