diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml
index d48584d..7043bf8 100644
--- a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml
+++ b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml
@@ -8,26 +8,35 @@
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:UIBDisassemblyViewModel}">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml.cs b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml.cs
index 21f4d68..4921451 100644
--- a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml.cs
+++ b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyView.xaml.cs
@@ -1,4 +1,6 @@
-using Microsoft.Iris.Debug.Data;
+using MahApps.Metro.Controls;
+using Microsoft.Iris.Debug.Data;
+using System.Windows;
using System.Windows.Controls;
namespace ZuneUIXTools.Modules.UIXCompiled
@@ -13,6 +15,20 @@ namespace ZuneUIXTools.Modules.UIXCompiled
public UIBDisassemblyView()
{
InitializeComponent();
+
+ InstructionListView.Loaded += InstructionListView_Loaded;
+ }
+
+ private void InstructionListView_Loaded(object sender, RoutedEventArgs e)
+ {
+ InstructionListView.Loaded -= InstructionListView_Loaded;
+ InstructionListView.FindChild().ScrollChanged += InstructionListView_ScrollChanged;
+ }
+
+ private void InstructionListView_ScrollChanged(object sender, ScrollChangedEventArgs e)
+ {
+ if (ViewModel.AutoScroll && e.ExtentHeightChange != 0)
+ ((ScrollViewer)sender).ScrollToBottom();
}
private void InstructionListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
diff --git a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyViewModel.cs b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyViewModel.cs
index 1fc049c..c9d27e7 100644
--- a/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyViewModel.cs
+++ b/ZuneUIXTools/Modules/UIXCompiled/UIBDisassemblyViewModel.cs
@@ -6,16 +6,10 @@ using Gemini.Modules.Inspector.Conventions;
using Gemini.Modules.Inspector.Inspectors;
using Microsoft.Iris.Debug.Data;
using System;
-using System.Collections;
-using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.Composition;
using System.Linq;
-using System.Linq.Expressions;
-using System.Reflection;
-using System.Windows.Threading;
-using WpfHexaEditor.Core.MethodExtention;
using ZuneUIXTools.Converters;
using ZuneUIXTools.Modules.Inspectors;
using ZuneUIXTools.Modules.UIX;
@@ -28,9 +22,16 @@ public class UIBDisassemblyViewModel : Document
readonly DebuggerService _debuggerService;
readonly IShell _shell;
UIBDisassemblyView _view;
+ bool _autoScroll;
public ObservableCollection Instructions { get; } = new();
+ public bool AutoScroll
+ {
+ get => _autoScroll;
+ set => Set(ref _autoScroll, value);
+ }
+
[ImportingConstructor]
public UIBDisassemblyViewModel(DebuggerService debuggerService, IShell shell)
{