<UserControl x:Class="ForeignKeyForSilverlight.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
	xmlns:telerik="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
    Width="400" Height="300">
    <Grid x:Name="LayoutRoot" Background="White">
		<Controls:RadGridView x:Name="radGridViewEditorSettings" AutoGenerateColumns="False">
			<Controls:RadGridView.Resources>
				<Style x:Key="cellStyle" TargetType="telerik:GridViewCell">
					<Setter Property="Template">
						<Setter.Value>
							<ControlTemplate TargetType="telerik:GridViewCell">
								<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
									<Grid>
										<ContentPresenter Name="PART_ContentPresenter" Visibility="Visible" Margin="{TemplateBinding Padding}" VerticalAlignment="Center" HorizontalAlignment="Stretch" Content="{Binding PersonType.JobTitle}" ContentTemplate="{TemplateBinding ContentTemplate}" />
										<ContentPresenter x:Name="PART_EditorPresenter" Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Stretch" />
									</Grid>
									<VisualStateManager.VisualStateGroups>
										<VisualStateGroup x:Name="EditingStates">
											<VisualState x:Name="Edited">
												<Storyboard>
													<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_EditorPresenter" Storyboard.TargetProperty="Visibility">
														<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
													</ObjectAnimationUsingKeyFrames>
													<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Visibility">
														<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
													</ObjectAnimationUsingKeyFrames>
												</Storyboard>
											</VisualState>
											<VisualState x:Name="Normal">
												<Storyboard>
													<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_EditorPresenter" Storyboard.TargetProperty="Visibility">
														<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed" />
													</ObjectAnimationUsingKeyFrames>
													<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_ContentPresenter" Storyboard.TargetProperty="Visibility">
														<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible" />
													</ObjectAnimationUsingKeyFrames>
												</Storyboard>
											</VisualState>
										</VisualStateGroup>
									</VisualStateManager.VisualStateGroups>
								</Border>
							</ControlTemplate>
						</Setter.Value>
					</Setter>
				</Style>
			</Controls:RadGridView.Resources>
			<Controls:RadGridView.Columns>
				<Controls:GridViewDataColumn UniqueName="EmployeeName" />
				<Controls:GridViewDataColumn UniqueName="PersonType" CellStyle="{StaticResource cellStyle}" />
			</Controls:RadGridView.Columns>
		</Controls:RadGridView>
	</Grid>
</UserControl>