Skip to content

Fix: DataGrid last column resize to view width#3417

Open
BornToBeRoot wants to merge 1 commit intomainfrom
fix/datagrid-fill-last-row
Open

Fix: DataGrid last column resize to view width#3417
BornToBeRoot wants to merge 1 commit intomainfrom
fix/datagrid-fill-last-row

Conversation

@BornToBeRoot
Copy link
Copy Markdown
Owner

Changes proposed in this pull request

Related issue(s)

Copilot AI review requested due to automatic review settings May 5, 2026 22:59
@github-actions github-actions Bot added this to the next-release milestone May 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses a WPF DataGrid layout quirk where star-sized (Width="*") columns initially render at their MinWidth when the grid starts empty, causing the last/main column to only fill remaining width after a window resize (Fixes #3416).

Changes:

  • Adds a one-shot LoadingRow handler to force star column width recomputation after the first row is realized.
  • Updates the DNS lookup results grid so the Result column uses Width="*" and enables text wrapping.
  • Slightly increases the query type ComboBox width (80 → 100).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Source/NETworkManager/Views/DNSLookupView.xaml Makes the results grid nameable and hooks LoadingRow; sets the last column to Width="*" with wrapping so it fills remaining width on first paint.
Source/NETworkManager/Views/DNSLookupView.xaml.cs Implements a one-shot LoadingRow handler that re-triggers star column measurement via dispatcher after the first row loads.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Result DataGrids: last column does not fill remaining width until window resize

2 participants