<UserControl
    x:Class="ResourcePlanner.Views.IssueListView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ResourcePlanner.Views"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:wct="using:Microsoft.Toolkit.Uwp.UI.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <wct:DataGrid SelectionChanged="IssueList_SelectionChanged"
        SelectionMode="Single"
        AutoGenerateColumns="False"
        ItemsSource="{x:Bind issueListVM.Issues,Mode=OneWay}">
        <wct:DataGrid.Columns>
            <wct:DataGridTextColumn Header="Title" Binding="{Binding Title}" IsReadOnly="True" CanUserSort="True"/>
            <wct:DataGridTextColumn Header="Type" Binding="{Binding IssueType}" IsReadOnly="True" CanUserSort="True"/>
            <wct:DataGridTextColumn Header="Creator" Binding="{Binding OpenedBy.FormattedName}" IsReadOnly="True" CanUserSort="True"/>
            <wct:DataGridTextColumn Header="Created on" Binding="{Binding OpenDate}" IsReadOnly="True" CanUserSort="True"/>
            <wct:DataGridCheckBoxColumn Header="Open" Binding="{Binding IsOpen}" IsReadOnly="True" CanUserSort="True"/>
            <wct:DataGridTextColumn Header="Closed by" Binding="{Binding ClosedBy.FormattedName}" IsReadOnly="True" CanUserSort="True"/>
            <wct:DataGridTextColumn Header="Closed on" Binding="{Binding CloseDateReadable}" IsReadOnly="True" CanUserSort="True"/>
        </wct:DataGrid.Columns>
    </wct:DataGrid>
</UserControl>
