Click here to Skip to main content
15,886,362 members
Articles / Mobile Apps / Windows Mobile

Restaurant and Waiter project! (WPF - Windows Mobile)

Rate me:
Please Sign up or sign in to vote.
4.90/5 (77 votes)
22 Jan 2012Ms-PL2 min read 243K   89.2K   182  
Restaurant and Waiter project! (WPF - Windows Mobile)
<UserControl xmlns:my1="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"  xmlns:my="clr-namespace:System.Windows.Controls;assembly=PresentationFramework"  x:Class="Restaurant.ProductTreeUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
    xmlns:My="clr-namespace:Restaurant"
    xmlns:local="clr-namespace:Restaurant"
             Loaded="UserControl_Loaded"
    d:DesignWidth="640" d:DesignHeight="480" FontFamily="Ariral" FontSize="14" Foreground="White" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <Grid Height="70">
    		<TextBlock Text="Group:" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="131,0,0,0" Height="30" TextAlignment="Left"/>
    		<ComboBox Margin="181,33,109,7" x:Name="cmbGroup" SelectionChanged="cmbGroup_SelectionChanged" Width="350" />
    	</Grid>
        <local:SortableListView Grid.Row="1" x:Name="ProductsGridView" Height="Auto"  Margin="10,10,10,5" 
                             Background="{x:Null}"  BorderBrush="{x:Null}"
            ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
            VirtualizingStackPanel.IsVirtualizing="True" ScrollViewer.CanContentScroll="True"
            SelectionMode="Single" IsSynchronizedWithCurrentItem="True"
                           ItemContainerStyle="{DynamicResource RestaurantListViewItemStyleSmall}"
                           Style="{DynamicResource RestaurantEditListViewStyle}" FontSize="12">
            <local:SortableListView.View >
                <GridView AllowsColumnReorder="False">
                    <GridViewColumn Width="4" HeaderContainerStyle="{DynamicResource FirstColumnGridViewColumnHeader}" CellTemplate="{StaticResource EmptyColumnTemplate}"/>
                    <local:SortListViewColumn Header="Product ID" DisplayMemberBinding="{Binding Path=ProductID}" SortProperty="ProductID" Width="100" SortStyle="RestaurantDataGridViewColumnHeader" HeaderContainerStyle="{DynamicResource RestaurantDataGridViewColumnHeader}"/>
                    <local:SortListViewColumn Header="Product Name" DisplayMemberBinding="{Binding Path=ProductName}" SortProperty="ProductName" Width="298" SortStyle="RestaurantDataGridViewColumnHeader" HeaderContainerStyle="{DynamicResource RestaurantDataGridViewColumnHeader}"/>
                    <local:SortListViewColumn Header="Unit" DisplayMemberBinding="{Binding Path=UnitName}" SortProperty="UnitName" Width="110" SortStyle="RestaurantDataGridViewColumnHeader" HeaderContainerStyle="{DynamicResource RestaurantDataGridViewColumnHeader}"/>
                    <local:SortListViewColumn Header="Price" DisplayMemberBinding="{Binding Path=Price}" SortProperty="Price" Width="100" SortStyle="RestaurantDataGridViewColumnHeader" HeaderContainerStyle="{DynamicResource RestaurantDataGridViewColumnHeader}"/>
                    <GridViewColumn Width="4" HeaderContainerStyle="{DynamicResource LastColumnGridViewColumnHeader}" CellTemplate="{StaticResource EmptyColumnTemplate}"/>
                </GridView>
            </local:SortableListView.View>
        </local:SortableListView>
        <Button Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="10" Width="120" Height="26" x:Name="btnPrint" Style="{DynamicResource BlueButtonStyle}" Content="Print Menu" Click="btnPrint_Click"/>
    </Grid>
</UserControl>

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 Microsoft Public License (Ms-PL)


Written By
Software Developer
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions