wpf 用户控件上启用拖放功能
微软官方例程
https://learn.microsoft.com/zh-cn/dotnet/desktop/wpf/advanced/walkthrough-enabling-drag-and-drop-on-a-user-control
public Circle(Circle c) { InitializeComponent(); this.circleUI.Height = c.circleUI.Height; this.circleUI.Width = c.circleUI.Height; this.circleUI.Fill = c.circleUI.Fill; }
同以下:
public Circle() { InitializeComponent(); } public Circle(Circle c) : this() { this.circleUI.Height = c.circleUI.Height; this.circleUI.Width = c.circleUI.Width; this.circleUI.Fill = c.circleUI.Fill; }
在 C# 的构造函数中,: this() 和 : base() 的核心区别在于它们调用的目标不同:: this() 调用当前类的其他构造函数,而 : base() 调用其基类(父类)的构造函数。
------------------------------------
承接
**视觉检测软件开发及调试
**工业软件开发
**上位机软件开发
wechat:luoran2024
qq:565934058
email:taoyuansu@qq.com
海量教育资源及影视资源下载
微信公众号:EFun科技
------------------------------------

浙公网安备 33010602011771号