摘要: 控件的宽度、高度都跟随着Window的长度和宽度 <Window x:Name="window" x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation 阅读全文
posted @ 2022-05-25 15:56 槑孒 阅读(1490) 评论(0) 推荐(0) 编辑
摘要: System.ArgumentException:'Invalid argument: geometry1 and geometry2 must have equivalent spatial references.' 参数无效:几何图形必须具有等价的空间引用。 阅读全文
posted @ 2022-05-25 13:26 槑孒 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 调用线程无法访问此对象,因为另一个线程拥有该对象问题,这种情况往往很常见,比如:说Timers和DoubleAnimation也就是计时器和动画一起使用就会出来这个错误。 // 其实加上一句话就行了,也就是设置线程的有优先级,异步 this.Dispatcher.Invoke(new Action( 阅读全文
posted @ 2022-05-25 08:58 槑孒 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Timer定时器,如果没有stop,是会按指定间隔时间一直重复执行的, 所以如果只想执行一次,必须得关闭。 System.Timers.Timer t = new System.Timers.Timer(10000);//实例化Timer类,设置间隔时间为10000毫秒; t.Elapsed += 阅读全文
posted @ 2022-05-25 08:56 槑孒 阅读(1633) 评论(0) 推荐(0) 编辑