<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="LibationAvalonia.Dialogs.EditReplacementChars"
        Title="EditReplacementChars">

	<DataGrid
		GridLinesVisibility="All"
		AutoGenerateColumns="False"
		Items="{Binding replacements}">
		
		<DataGrid.Columns>
			
			<DataGridTemplateColumn Width="Auto" Header="Char to&#xa;Replace">
				<DataGridTemplateColumn.CellTemplate>
					<DataTemplate>
						<TextPresenter
							Height="18"
							Margin="10,0,10,0"
							VerticalAlignment="Center"
							FontFamily="SEGOEUI_Local"
							Text="{Binding Replacement.CharacterToReplace}" />
					</DataTemplate>
				</DataGridTemplateColumn.CellTemplate>
			</DataGridTemplateColumn>
			
			<DataGridTemplateColumn IsReadOnly="False" Width="Auto" Header="Replacement Text">
				<DataGridTemplateColumn.CellTemplate>
					<DataTemplate>
						<Grid RowDefinitions="*" ColumnDefinitions="*">

							<TextBox
								Grid.Column="0"
								Grid.Row="0"
								VerticalAlignment="Stretch"
								HorizontalAlignment="Stretch"
								FontSize="14"
								FontFamily="SEGOEUI_Local"
								Foreground="{StaticResource SystemControlTransparentBrush}"
								SelectionBrush="{StaticResource SystemControlTransparentBrush}"
								BorderBrush="{StaticResource SystemControlTransparentBrush}"
								Text="{Binding ReplacementText, Mode=TwoWay}" />
							<TextBlock
								Grid.Column="0"
								Grid.Row="0"
								HorizontalAlignment="Stretch"
								VerticalAlignment="Stretch"
								FontSize="14"
								FontFamily="SEGOEUI_Local"
								Text="{Binding ReplacementText}" />
						</Grid>
					</DataTemplate>
				</DataGridTemplateColumn.CellTemplate>
			</DataGridTemplateColumn>
			
		</DataGrid.Columns>
	</DataGrid>
	
</Window>
