1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-06-13 14:29:30 +00:00
Commit Graph

2 Commits

Author SHA1 Message Date
Andy McFadden
ea6125ea82 Save and restore grid column widths
Now preserving column widths for the three DataGrids and the main
ListView.  In theory the various grids would conveniently auto-size
to the content, but in practice that doesn't work well with
virtualization.

There is, of course, no simple "the width has changed" event
provided by the control.  On the plus side, you can attach a
property-change event handler to pretty much anything, so once you
know the trick it's possible to make everything work.  Yay WPF.
2019-06-20 15:10:35 -07:00
Andy McFadden
96a92f0335 Load/save app settings
This change pulls in the settings file code, which is mostly
unchanged except when it comes to saving and restoring the window
location and size.

The old system has been replaced with a PInvoke-based version that
calls the underlying Win32 window placement code.  This is more
likely to be correct when multiple displays are in use, and can
record the un-maximized size of a maximized window.  It leaves a
nasty XML string embedded in the config file, but it's not really
meant to be human-readable anyway.

The sub-window dividers all work completely differently from the way
they did in WinForms, and some of the behavior is a bit obscure
(like noticing when a splitter moves due to keyboard input, and
setting the position in a way that doesn't break the auto-sizing).
Yay WPF.

Still need to preserve column widths.
2019-06-19 18:09:55 -07:00