From 14150af00453a81c2e67df7b2a746e1326e10b58 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Tue, 1 Oct 2019 18:20:51 -0700 Subject: [PATCH] Allow explicit widths in project/platform symbols, part 2 Added a Width column to the list in the project symbol editor. Changed the local variable table editor and the project symbol editor to use DataGrid instead of ListView. This gets us easy sorting on arbitrary columns. The previous code was reloading the display list after every change; now we just add/edit/remove individual items, which helps keep the list position and selection stable. --- SourceGen/WpfGui/EditLocalVariableTable.xaml | 51 +++-- .../WpfGui/EditLocalVariableTable.xaml.cs | 184 ++++++++++++---- SourceGen/WpfGui/EditProjectProperties.xaml | 50 +++-- .../WpfGui/EditProjectProperties.xaml.cs | 198 ++++++++++++++---- SourceGen/WpfGui/MainWindow.xaml | 3 +- SourceGen/WpfGui/MainWindow.xaml.cs | 9 +- 6 files changed, 374 insertions(+), 121 deletions(-) diff --git a/SourceGen/WpfGui/EditLocalVariableTable.xaml b/SourceGen/WpfGui/EditLocalVariableTable.xaml index 4458f54..471cdf7 100644 --- a/SourceGen/WpfGui/EditLocalVariableTable.xaml +++ b/SourceGen/WpfGui/EditLocalVariableTable.xaml @@ -48,28 +48,37 @@ limitations under the License. - - - - - - - - - - - - - - + IsReadOnly="True" + FontFamily="{StaticResource GeneralMonoFont}" + SnapsToDevicePixels="True" + GridLinesVisibility="Vertical" + VerticalGridLinesBrush="#FF7F7F7F" + AutoGenerateColumns="False" + HeadersVisibility="Column" + CanUserReorderColumns="False" + SelectionMode="Single" + SelectionChanged="SymbolsList_SelectionChanged" + Sorting="SymbolsList_Sorting" + MouseDoubleClick="SymbolsList_MouseDoubleClick"> + + + + + + + + + + + + + +