From 406c9db0571cf91ef70bceaf15e0cc35a32a4196 Mon Sep 17 00:00:00 2001 From: Benjamin Popp Date: Tue, 7 May 2019 21:44:00 -0500 Subject: [PATCH] Refactor For a long time now, MainWindow has housed basically all the xaml for the entire application. It got too big. It now houses all the xaml for the view of the EditorViewModel (basically the viewmodel of the overall appliaction) while the tab content has been moved to a TabView (which has the ViewPort for a viewmodel). The TabView contains the HexElement, along with all the goods that wrap around it (the column/row headers, the address bar at the bottom, various scroll bars, the tools). Several of the methods were able to move from the main window to the TabView. --- src/HexManiac.WPF/Controls/TabView.xaml | 194 +++++++++++++++++++ src/HexManiac.WPF/Controls/TabView.xaml.cs | 42 ++++ src/HexManiac.WPF/HexManiac.WPF.csproj | 7 + src/HexManiac.WPF/Windows/MainWindow.xaml | 189 +----------------- src/HexManiac.WPF/Windows/MainWindow.xaml.cs | 31 +-- src/HexManiac.WPF/Windows/ThemeSelector.xaml | 4 +- 6 files changed, 247 insertions(+), 220 deletions(-) create mode 100644 src/HexManiac.WPF/Controls/TabView.xaml create mode 100644 src/HexManiac.WPF/Controls/TabView.xaml.cs diff --git a/src/HexManiac.WPF/Controls/TabView.xaml b/src/HexManiac.WPF/Controls/TabView.xaml new file mode 100644 index 00000000..52de87f0 --- /dev/null +++ b/src/HexManiac.WPF/Controls/TabView.xaml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - -