I have a DataGrid which, when empty, I wish to display a background image. When the DataGrid is populated I wish for the image to disappear, and reappear if the DataGrid is cleared again.
Is this possible either through XAML or C#?
if(myDataGridView.Rows.Count == 0) {
dataGrid.Background = new ImageBrush("exampleImage.png");
}
else {
// it is not empty
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With