<UserControl x:Class="WPFUI.View.ProductsView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:tk="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" xmlns:acb="clr-namespace:AttachedCommandBehavior;assembly=AttachedCommandBehavior" Style="{StaticResource ViewStyle}"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="30"/> <RowDefinition/> <RowDefinition Height="30"/> </Grid.RowDefinitions> <Button Grid.Row="0" HorizontalAlignment="Left" Content="Load Data" Command="{Binding Call}" CommandParameter="LoadData" /> <ListView Grid.Row="1" Style="{StaticResource EntityCollectionViewListStyle}" ItemsSource="{Binding EntityCollection}" > <ListView.View> <GridView> <GridViewColumn Header="Name" DisplayMemberBinding="{Binding ProductName}" Width="120"/> <GridViewColumn Header="Price" DisplayMemberBinding="{Binding ProductPrice}" Width="70"/> <GridViewColumn Header="Photo" Width="50"> <GridViewColumn.CellTemplate> <DataTemplate> <Image Source="{Binding ProductPhotography}" Width="30" Height="35"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> </ListView> <Button Grid.Row="2" HorizontalAlignment="Left" Content="Remove Selected" Command="{Binding Call}" CommandParameter="RemoveSelected" IsEnabled="{Binding CanRemove}" /> </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.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)