WPF Datagrid Autoresize on Maximize

Posted by  Royce Roy
 3887  View(s)
Rate this:

My WPF application has a resolution of 1024x768. I have a datagrid that fills a vertical half of the application. In higher resolutions, when I maximize I want the datagrid to automatically resize vertically and fill the entire height. How can I do this?

  1. Re: WPF datagrid autoresize on maximize

    Hi Royce,

    You can try setting the control's vertical alignment to stretch (VeritcalAlignment="Stretch") so that even when your window resizes, it still fills up the vertical part of your screen.

      Modified On Mar-31-2018 01:23:17 AM