<Window x:Class="CustomPropertyGrid.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:my="clr-namespace:CustomPropertyGrid"
        Title="MainWindow" Height="700" Width="700">
	<Window.Resources>
		<my:MyViewModel x:Key="MyViewModel"/>
	</Window.Resources>
	<Grid DataContext="{StaticResource MyViewModel}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <telerik:RadPropertyGrid Item="{Binding Clubs[0]}"
                                 AutoGeneratePropertyDefinitions="False">
            <telerik:RadPropertyGrid.PropertyDefinitions>
                <telerik:PropertyDefinition Binding="{Binding Name}" DisplayName="Name"/>
                <telerik:PropertyDefinition Binding="{Binding Established}" DisplayName="Established"/>
                <telerik:PropertyDefinition Binding="{Binding StadiumCapacity}" DisplayName="Stadium Capacity"/>
                <telerik:PropertyDefinition >
                    <telerik:PropertyDefinition.EditorTemplate>
                        <DataTemplate>
                            <Button Name="Button1"
                                    Content="Open new window" 
                                    Command="{Binding NewWindowCommand, Source={StaticResource MyViewModel}}"
                                    Height="25"
                                    HorizontalAlignment="Left"/>
                        </DataTemplate>
                    </telerik:PropertyDefinition.EditorTemplate>
                </telerik:PropertyDefinition>
            </telerik:RadPropertyGrid.PropertyDefinitions>
        </telerik:RadPropertyGrid>
	</Grid>
</Window>
