<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"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="CheckArticlesForSpam.Views.ArticlesUserPage"
			 xmlns:vm="using:CheckArticlesForSpam.ViewModels"
			 x:DataType="vm:MainWindowViewModel">
	<StackPanel
		Width="{Binding $parent[UserControl].Bounds.Width}"
		Height="{Binding $parent[UserControl].Bounds.Height}"
		Background="#ebe2d9">
		<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
			<Button
				FontFamily="{StaticResource TitleFont}"
				Padding="20 10 20 10"
				Content="СОЗДАТЬ СТАТЬЮ"
				Background="#ebe2d9"
				Foreground="#946E42"
				FontSize="20"
				Margin=" 0 20 30 20"
				BorderThickness="3"
				BorderBrush="#7F5E38"
				HorizontalAlignment="Center"
				Command="{Binding OpenNewArticleDate}">
				<Button.Styles>
					<Style Selector="Button:pointerover /template/ ContentPresenter">
						<Setter Property="Background" Value="#D8B389"></Setter>
						<Setter Property="Foreground" Value="White"></Setter>
					</Style>
				</Button.Styles>
			</Button>
			<Button
				FontFamily="{StaticResource TitleFont}"
				Padding="20 10 20 10"
				Content="ОТКРЫТЬ СТАТЬЮ"
				Background="#ebe2d9"
				Foreground="#946E42"
				FontSize="20"
				Margin=" 0 20 0 20"
				BorderThickness="3"
				BorderBrush="#7F5E38"
				HorizontalAlignment="Center"
				Command="{Binding OpenArticle}">
				<Button.Styles>
					<Style Selector="Button:pointerover /template/ ContentPresenter">
						<Setter Property="Background" Value="#D8B389"></Setter>
						<Setter Property="Foreground" Value="White"></Setter>
					</Style>
				</Button.Styles>
			</Button>
			<Button
				FontFamily="{StaticResource TitleFont}"
				Padding="20 10 20 10"
				Content="УДАЛИТЬ СТАТЬЮ"
				Background="#ebe2d9"
				Foreground="#946E42"
				FontSize="20"
				Margin="30 20 0 20"
				BorderThickness="3"
				BorderBrush="#7F5E38"
				HorizontalAlignment="Center"
				Command="{Binding DeleteSrticleInBD}">
				<Button.Styles>
					<Style Selector="Button:pointerover /template/ ContentPresenter">
						<Setter Property="Background" Value="#D8B389"></Setter>
						<Setter Property="Foreground" Value="White"></Setter>
					</Style>
				</Button.Styles>
			</Button>
		</StackPanel>
		<DataGrid
			Width="{Binding $parent[StackPanel].Bounds.Width}"
			Height="{Binding $parent[StackPanel].Bounds.Height}"
			Background="White"
			FontSize="40"
			IsReadOnly="True"
			GridLinesVisibility="All"
			BorderThickness="3"
			BorderBrush="#BBBBBB"
			ItemsSource="{Binding ArticlesUserPageVM.Article}"
			SelectedItem="{Binding ArticlesUserPageVM.ItemArticle}">
			<DataGrid.Columns >
				<DataGridTextColumn
					Header="Название статьи"
					Binding="{Binding Title}"
					Width="*"/>
				<DataGridCheckBoxColumn
					Header="Правдивая статья"
					Binding="{Binding CheckSpam}"
					Width="150"/>
			</DataGrid.Columns>
		</DataGrid>
	</StackPanel>

</UserControl>
