sourcegit/src/Views/DiffView.axaml.cs
leo 15d3ad355d
code_review: PR #703
* change the name of this feature to `Enable Block-Navigation`
* change the icon of the toggle button used to enable this feature
* use a new class `BlockNavigation` to hold all the data about this feature
* create `BlockNavigation` data only when it is enabled

Signed-off-by: leo <longshuang@msn.cn>
2024-12-08 21:02:30 +08:00

28 lines
710 B
C#

using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.VisualTree;
namespace SourceGit.Views
{
public partial class DiffView : UserControl
{
public DiffView()
{
InitializeComponent();
}
private void OnGotoPrevChange(object _, RoutedEventArgs e)
{
var textDiff = this.FindDescendantOfType<TextDiffView>();
textDiff?.GotoPrevChange();
e.Handled = true;
}
private void OnGotoNextChange(object _, RoutedEventArgs e)
{
var textDiff = this.FindDescendantOfType<TextDiffView>();
textDiff?.GotoNextChange();
e.Handled = true;
}
}
}