|
<Window x:Class="Example3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Example3"
Title="Example 3" Height="350" Width="525" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
<Window.DataContext>
<!-- Declaratively create an instance of our SongViewModel -->
<local:SongViewModel />
</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 UpdateArtistName}" />
</MenuItem>
</Menu>
<Label Grid.Column="0" Grid.Row="1" Content="Example 3 - using ICommand!" />
<Label Grid.Column="0" Grid.Row="2" Content="Artist: " />
<Label Grid.Column="1" Grid.Row="2" Content="{Binding ArtistName}" />
<Button Grid.Column="1" Grid.Row="3" Name="ButtonUpdateArtist" Content="Update Artist Name" Command="{Binding UpdateArtistName}" />
</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.