<Window x:Class="CellTemplateSelector_MultipleColumns.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:CellTemplateSelector_MultipleColumns"
        Title="MainWindow" Height="700" Width="700">
	<Window.Resources>
		<my:MyViewModel x:Key="MyViewModel"/>
		<my:MyCellTemplateSelector x:Key="myCellTemplateSelector">
			<my:MyCellTemplateSelector.zeroStyle>
				<DataTemplate>
					<TextBlock Text="{Binding Number}"
                       TextDecorations="underline"
                       Foreground="HotPink"
                       TextAlignment="Right" />
				</DataTemplate>
			</my:MyCellTemplateSelector.zeroStyle>
			
			<my:MyCellTemplateSelector.oneStyle>
				<DataTemplate>
					<TextBlock Text="{Binding Number}"
                       FontWeight="Bold"
                       Foreground="CornflowerBlue"
                       TextAlignment="Left" />
				</DataTemplate>
			</my:MyCellTemplateSelector.oneStyle>
			
			<my:MyCellTemplateSelector.zeroStyle1>
				<DataTemplate>
					<TextBlock Text="{Binding Number1}"
                       TextDecorations="underline"
                       Foreground="HotPink"
                       TextAlignment="Right" />
				</DataTemplate>
			</my:MyCellTemplateSelector.zeroStyle1>

			<my:MyCellTemplateSelector.oneStyle1>
				<DataTemplate>
					<TextBlock Text="{Binding Number1}"
                       FontWeight="Bold"
                       Foreground="CornflowerBlue"
                       TextAlignment="Left" />
				</DataTemplate>
			</my:MyCellTemplateSelector.oneStyle1>
			
			<my:MyCellTemplateSelector.zeroStyle2>
				<DataTemplate>
					<TextBlock Text="{Binding Number2}"
                       TextDecorations="underline"
                       Foreground="HotPink"
                       TextAlignment="Right" />
				</DataTemplate>
			</my:MyCellTemplateSelector.zeroStyle2>

			<my:MyCellTemplateSelector.oneStyle2>
				<DataTemplate>
					<TextBlock Text="{Binding Number2}"
                       FontWeight="Bold"
                       Foreground="CornflowerBlue"
                       TextAlignment="Left" />
				</DataTemplate>
			</my:MyCellTemplateSelector.oneStyle2>
			
		</my:MyCellTemplateSelector>
	</Window.Resources>
	<Grid DataContext="{StaticResource MyViewModel}">
		<Grid.RowDefinitions>
			<RowDefinition Height="*"/>
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<telerik:RadGridView Name="playersGrid" 
                                     ItemsSource="{Binding Players}" 
                                     AutoGenerateColumns="False">
			<telerik:RadGridView.Columns>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Number}"  CellTemplateSelector="{StaticResource myCellTemplateSelector}"/>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Number1}" CellTemplateSelector="{StaticResource myCellTemplateSelector}"/>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Number2}" CellTemplateSelector="{StaticResource myCellTemplateSelector}"/>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Position}"/>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Country}"/>
			</telerik:RadGridView.Columns>
		</telerik:RadGridView>
				
	</Grid>
</Window>
