<Window x:Class="Example5.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Example5" Title="Example 5" Height="464" Width="530" > <Window.DataContext> <!-- Declaratively create an instance of our Album View Model--> <local:AlbumViewModel /> </Window.DataContext> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Menu Grid.Row="0" Grid.ColumnSpan="3"> <MenuItem Header="Test"> <MenuItem Header="Update Artist" Command="{Binding UpdateAlbumArtists}" /> </MenuItem> </Menu> <Label Grid.Column="0" Grid.Row="1" Content="Example 5 - collection" /> <Button Grid.Column="1" Grid.Row="1" Content="Add new artist" Command="{Binding AddAlbumArtist}" /> <ListView Grid.Column="1" Grid.Row="2" ItemsSource="{Binding Songs}" > <ListView.ItemTemplate> <DataTemplate> <StackPanel> <Label Content="{Binding ArtistName}" /> <Label Content="{Binding SongTitle}" FontSize="10" /> </StackPanel> </DataTemplate> </ListView.ItemTemplate> </ListView> <Button Grid.Column="1" Grid.Row="3" Content="Update Artist Name" Command="{Binding UpdateAlbumArtists}" /> <Label Content="Update doesn't work!" Grid.Row="2" /> </Grid> </Window>
By viewing downloads associated with this article you agree to the Terms of use 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)
The Next Version of Android - Some of What's Coming