Source

MusicRater / MusicRater / Views / ConfigWindow.xaml

Full commit
<controls:ChildWindow x:Class="MusicRater.ConfigWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"
           xmlns:dummy="clr-namespace:MusicRater.DummyViewModels"
           d:DataContext="{Binding Source={StaticResource viewModel}}"           
           Width="400" Height="300" 
           xmlns:my="clr-namespace:MusicRater.MvvmUtils"
           my:DialogCloser.DialogResult="{Binding DialogResult}"
           Title="Configure MusicRater">
    <controls:ChildWindow.Resources>
        <dummy:DummyConfigWindowViewModel x:Key="viewModel" />
    </controls:ChildWindow.Resources>
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ItemsControl ItemsSource="{Binding Criteria}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        
                        <TextBox Margin="2" Text="{Binding Name}" Width="150" MaxLength="30" />
                        <Slider Margin="2" Value="{Binding Weight}" Minimum="0" Maximum="10" Width="100" />
                    </StackPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <Button x:Name="CancelButton" Command="{Binding UpdateCommand}" Content="Cancel" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
        <Button x:Name="OKButton" Command="{Binding CancelCommand}" Content="OK" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
    </Grid>
</controls:ChildWindow>