摘要: 我需要考虑如何检测DataGrid中当前可见的行。WPF的DataGrid内部使用ScrollViewer来管理滚动,因此需要监听ScrollViewer的ScrollChanged事件。当用户滚动时,可以通过计算可视区域的位置来确定哪些行被显示。在MVVM模式下,直接访问DataGrid的行可能会 阅读全文
posted @ 2025-03-08 14:15 FalyEnd 阅读(48) 评论(0) 推荐(0)
摘要: 首先是利用 ItemsControl 来随机(或者根据绑定传的值)来分布位置 主要是用Canvas来当画布, 然后由值来调整位置 首先,创建实体类 public class ClassA { public double UpTop{ get; set; } public double UpLeft{ 阅读全文
posted @ 2024-01-30 09:49 FalyEnd 阅读(24) 评论(0) 推荐(0)
摘要: 看到一些资料与教程视频, 首先 我们先做好一个公共的INotifyPropertyChanged事件,也就是通知更新,当然 如果你安装了MvvmLight包,可以直接直接不用写 public class ViewModelBase : INotifyPropertyChanged { public 阅读全文
posted @ 2022-03-16 13:56 FalyEnd 阅读(294) 评论(0) 推荐(0)
摘要: 直接上代码 给你们看看梨子 <Window.Resources> <Style x:Key="BorderStyle" TargetType="{x:Type Border}"> <Setter Property="BorderThickness" Value="5" /> <Style.Trigg 阅读全文
posted @ 2021-12-28 16:34 FalyEnd 阅读(182) 评论(0) 推荐(0)
摘要: StaticResource 是静态资源 DynamicResource是动态资源 用一下例子说明 <Window.Resources> <Style x:Key="BorderStyle" TargetType="{x:Type Border}"> <Setter Property="Border 阅读全文
posted @ 2021-12-28 15:05 FalyEnd 阅读(504) 评论(2) 推荐(4)
摘要: 恶搞请假条 看到一堆人写这东西还收费,我就佛了,特喵我直接弄了一个,代码都差不多 ,各位朋友拿去用! <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>请假条</title> <style> html, body { ma 阅读全文
posted @ 2021-12-24 15:50 FalyEnd 阅读(326) 评论(0) 推荐(0)