Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
namespace EdaBoardViewer.Tools {
using System;
using Avalonia.Controls;
using Avalonia.Input;
public sealed class DesignToolBehavior<TControl> where TControl : Control {
private readonly TControl owner;
public DesignToolBehavior(TControl owner) {
this.owner = owner ?? throw new ArgumentNullException(nameof(owner));
}
public void Attach() {
owner.PointerPressed += Owner_PointerPressed;
owner.PointerReleased += Owner_PointerReleased;
owner.PointerMoved += Owner_PointerMoved;
}
public void Detach() {
owner.PointerPressed -= Owner_PointerPressed;
owner.PointerReleased -= Owner_PointerReleased;
owner.PointerMoved -= Owner_PointerMoved;
}
private void Owner_PointerMoved(object sender, PointerEventArgs e) {
}
private void Owner_PointerReleased(object sender, PointerReleasedEventArgs e) {
}
private void Owner_PointerPressed(object sender, PointerPressedEventArgs e) {
}
}
}
1de7a351fThis file is pinned to the selected release. Download the original to open it in your design tool.