添加项目文件。

This commit is contained in:
2026-04-30 11:34:41 +08:00
parent a8539ccaac
commit 80635aa46e
181 changed files with 16378 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
using Microsoft.Xaml.Behaviors;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace SamplePreSystem.UI.Behaviors
{
public class BorderMouseMoveBehavior :Behavior<Border>
{
protected override void OnAttached()
{
//base.OnAttached();
AssociatedObject.MouseMove += AssociatedObject_MouseMove;
}
private void AssociatedObject_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
// 获取窗口并执行拖拽
if (Window.GetWindow(AssociatedObject) is Window window)
{
window.DragMove();
}
}
}
}
}