My datagrid's ItemSource is set in the constructor as
dataGridShortcuts.ItemsSource = new DirectoryInfo(@"X:\Shortcuts").GetFiles();
My first problem is that there are too many columns being displayed. I am only interested in the name of the file and it's associated image.
<DataGrid x:Name="dataGridShortcuts" FontSize="16" CanUserDeleteRows="False" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Shortcut Name" />
</DataGrid.Columns>
<DataGrid.RowDetailsTemplate>
<DataTemplate>
<Image Height="100" />
</DataTemplate>
</DataGrid.RowDetailsTemplate>
</DataGrid>
I think my XAML is wrong and I'm not sure how I can fix it.
After turning off AutoGenerate, I get a list of nothing. Please help me bind or get the file name into "Shortcut Name" and Icon for that name into the image
I updated the XAML