<Window x:Class="RadGridView_SqeezingColumns.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:telerikGridView ="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
        xmlns:my="clr-namespace:RadGridView_SqeezingColumns"
        Title="MainWindow" Height="700" Width="700">
	<Window.Resources>
		<my:MyViewModel x:Key="MyViewModel"/>
        
        <!-- Telerik Data Grid Style Definations -->
        <Style TargetType="telerik:GridViewHeaderCell">
            <Setter Property="Background" Value="BlanchedAlmond"/>
            <Setter Property="BorderBrush" Value="#D4D6D6"/>
            <Setter Property="BorderThickness" Value="1"/>
            <!--Setter Property="Height" Value="27"/-->
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
        </Style>

        <Style x:Key="GridViewHeaderRowStyle" TargetType="{x:Type telerik:GridViewHeaderRow}">
            <Setter Property="Background" Value="White"/>
            <Setter Property="BorderBrush" Value="#D4D6D6"/>
        </Style>

        <Style x:Key="AlternateRowStyle" TargetType="{x:Type telerikGridView:GridViewRow}">
            <Setter Property="Background" Value="#E3F0F9" />
            <Setter Property="BorderBrush" Value="#D4D6D6" />
            <!--Setter Property="Height" Value="30"/-->
        </Style>

        <Style x:Key="GridViewRowStyle" TargetType="{x:Type telerikGridView:GridViewRow}">
            <Setter Property="Background" Value="White" />
            <Setter Property="BorderBrush" Value="#D4D6D6" />
            <!--Setter Property="Height" Value="30"/-->
        </Style>
        <Style x:Key="DataCellsPresenter" TargetType="{x:Type telerik:GridViewHeaderRow}">
            <Setter Property="Background" Value="Aquamarine" />
            <Setter Property="BorderBrush" Value="#D4D6D6" />
        </Style>
        <DataTemplate x:Key="GridViewHeaderIndentCellDataTemplate">
            <telerik:GridViewHeaderIndentCell BorderBrush="#D4D6D6"/>
        </DataTemplate>
        <DataTemplate x:Key="GridViewHeaderIndicatorPresenterTemplate">
            <telerik:IndicatorPresenter  x:Name="PART_IndicatorPresenter" 
                                            Background="Bisque" 
                                            BorderBrush="Black"
                                            BorderThickness="1"
                                            Grid.Column="0" HorizontalAlignment="Left" 
                                            Width="24"/>
        </DataTemplate>
        <!-- Telerik Data Grid Style-->
        <Style TargetType="{x:Type telerik:RadGridView}">
            <Setter Property="HeaderRowStyle" Value="{DynamicResource GridViewHeaderRowStyle}"/>
            <Setter Property="AlternateRowStyle" Value="{DynamicResource AlternateRowStyle}"/>
            <Setter Property="IsFilteringAllowed" Value="false"/>
            <Setter Property="RowStyle" Value="{DynamicResource GridViewRowStyle}"/>
            <Setter Property="GridLinesVisibility" Value="Both"/>
            <Setter Property="Cursor" Value="Hand"/>
            <Setter Property="Background" Value="White" />
            <Setter Property="VerticalGridLinesBrush" Value="#D4D6D6"/>
            <Setter Property="HorizontalGridLinesBrush" Value="#D4D6D6"/>
            <!--Setter Property="MinColumnWidth" Value="20"/-->
            <!--Setter Property="MaxColumnWidth" Value="150"/-->
            <!--Setter Property="ColumnWidth" Value="100"/-->
            <Setter Property="RowIndicatorVisibility" Value="Collapsed"/>
            <!--Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected"/-->
            <Setter Property="AlternationCount" Value="2"/>
            <Setter Property="VerticalAlignment" Value="Top"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="ShowGroupPanel" Value="False"/>
            <Setter Property="AutoGenerateColumns" Value="False"/>
            <Setter Property="IsReadOnly" Value="True"/>
            <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
            <Setter Property="IsScrolling" Value="false"/>

            <Setter Property="Margin" Value="0,0,0,0"/>
        </Style>
    </Window.Resources>
	<Grid DataContext="{StaticResource MyViewModel}">
		<Grid.RowDefinitions>
			<RowDefinition Height="*"/>
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<telerik:RadGridView Grid.Row="0" 
                             Name="clubsGrid" 
                             ItemsSource="{Binding Clubs}"
                             AutoGenerateColumns="False"
                             Margin="5">
			<telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" SortingState="Ascending" Width="*" TextWrapping="NoWrap"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding SecondName}" Width="*" TextWrapping="NoWrap"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding LastName}"  Width="*" TextWrapping="NoWrap"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"  Width="*" TextWrapping="NoWrap"
                                            Header="Est." 
                                            DataFormatString="{}{0:yyyy}"/>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}" 
                                            Header="Stadium" />
            </telerik:RadGridView.Columns>
		</telerik:RadGridView>
	</Grid>
</Window>
