<UserControl 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"
			 xmlns:vm="using:Needlework.Net.ViewModels.Pages.Schemas"
			 xmlns:views="using:Needlework.Net.Views.Pages.Schemas"
			 xmlns:controls="using:Needlework.Net.Controls"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Needlework.Net.Views.Pages.Schemas.SchemasView"
			 x:DataType="vm:SchemasViewModel">
	<controls:BusyArea IsBusy="{Binding IsBusy}"
					   BusyText="Loading...">
		<Grid Margin="16"
			  ColumnDefinitions="*"
			  RowDefinitions="auto,*">
			<TextBox Text="{Binding Search}"
					 Watermark="Search schemas"
					 Margin="0 0 0 8"
					 Grid.Row="0"
					 Grid.Column="0"/>
			<ScrollViewer Grid.Row="1"
						  Grid.Column="0"
						  Offset="{Binding Offset, Mode=TwoWay}">
				<ItemsControl ItemsSource="{Binding SchemaItems}">
					<ItemsControl.Styles>
						<Style Selector="views|SchemaSearchDetailsView">
							<Setter Property="Margin" Value="0 0 0 8" />
						</Style>
					</ItemsControl.Styles>
					<ItemsControl.ItemsPanel>
						<ItemsPanelTemplate>
							<VirtualizingStackPanel />
						</ItemsPanelTemplate>
					</ItemsControl.ItemsPanel>
					<ItemsControl.ItemTemplate>
						<DataTemplate>
							<ContentControl Content="{Binding}"/>
						</DataTemplate>
					</ItemsControl.ItemTemplate>
				</ItemsControl>
			</ScrollViewer>
		</Grid>
	</controls:BusyArea>
</UserControl>
