c# 小知识点
Posted lonelyrains
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c# 小知识点相关的知识,希望对你有一定的参考价值。
Sysinternals Suite - Windows Sysinternals | Microsoft Docs
- DispatcherTimer 定时器可以设置控件 但是 System.Timers.Timer不行
- 表格支持拖拽:
<GridSplitter Grid.Row="0" Grid.Column="1" Width="5" HorizontalAlignment="Stretch"/>
- Hardcodet.Wpf.TaskbarNotification 托盘
- 适当使用stackpanel完成堆按钮、按钮堆图片和文字的toolbar的功能,自定义调整,比toolbar好用
- xceed.wpf.datagrid xceed.wpf.toolkit?商业不免费
- DependencyProperty? 自定义控件,适配属性变更逻辑
- 博客 ARM830 - 博客园
Windows Presentation Foundation - WPF .NET Framework | Microsoft Docs
- 关于pinvoke 自动转换工具 StructLayout 字节对齐: c# 下[StructLayout(LayoutKind.Sequential, Pack = 4)] c++下设置#pragma pack(4) [自验证过]
- c#、c++混合调试:c#项目->属性->调试->启用本地代码调试
- any cpu 表示64位,则不能打开优先32位:c#项目->属性->生成->平台目标->首选32位 去勾选
神器如 dnSpy,无需源码也能修改 .NET 程序_walterlv - 吕毅-CSDN博客_dnspy
读写app.config AppSettings,保留注释与不保留注释 - 小小高 - 博客园 (cnblogs.com)
- 打包dll、exe,把引用当资源管理
- 响应式编程,更新事件自动在应用中传播
WinAppDriver and Desktop UI Test Automation (microsoft.com)
system.data.sqlite.dll 依赖不全
DataGrid绑定数据,非常简单好用,不用自己维护一致性
DataGrid Class (System.Windows.Controls) | Microsoft Docs
DataGrid显示行号(支持编辑时更新)wpfdatagrid - WPF 4 DataGrid: Getting the Row Number into the RowHeader - Stack Overflow
c# - WPF add datagrid image column possible? - Stack Overflow
WPF的Datagrid显示,样式(隔行换色)_沙漠飞鱼的博客-CSDN博客
c# - How to use ContextMenu to access cell value of DataGrid? - Stack Overflow
第六节:深入研究Task实例方法ContinueWith的参数TaskContinuationOptions_sinolover的专栏-CSDN博客
该类型的 CollectionView 不支持从调度程序线程以外的线程对其 SourceCollection 进行的更改
System.Windows.Application.Current.Dispatcher.Invoke((Action)(() =>
LogList.Add(string.Format("表导入数据出错!"));
));
单例 this.DataContext=MyData.Instance;
usercontrol的子结构bindingusercontrol的datacontext时,直接写
<DataGrid ItemsSource="Binding"
CanUserAddRows="False" AutoGenerateColumns="False"
HeadersVisibility="All">
<DataGrid.Columns>
<DataGridTextColumn Header="Time" Binding="Binding Time"/>
<DataGridTextColumn Header="Msg" Binding="Binding Msg"/>
</DataGrid.Columns>
</DataGrid>
(1条消息) WPF的Treeview控件实现CheckBox_niuge8905的博客-CSDN博客
(2条消息) Dispatcher.BeginInvoke()方法使用不当导致UI界面卡死的原因分析_三五月儿的专栏-CSDN博客_dispatcher.begininvoke
异步转同步 What is the best way to call a async method in a sync method? (optimizely.com)
public static class AsyncHelper
private static readonly TaskFactory _taskFactory = new
TaskFactory(CancellationToken.None,
TaskCreationOptions.None,
TaskContinuationOptions.None,
TaskScheduler.Default);
public static TResult RunSync<TResult>(Func<Task<TResult>> func)
=> _taskFactory
.StartNew(func)
.Unwrap()
.GetAwaiter()
.GetResult();
public static void RunSync(Func<Task> func)
=> _taskFactory
.StartNew(func)
.Unwrap()
.GetAwaiter()
.GetResult();
WPF程序加入3D模型_Huang_lidong的博客-CSDN博客
helix-toolkit/helix-toolkit: Helix Toolkit is a collection of 3D components for .NET. (github.com)
** 体系结构分析和建模工具 - Visual Studio (Windows) | Microsoft Docs
WPF 自定义滚动条(ScrollView、ScrollBar)样式 - 一叶知秋,知寒冬 - 博客园 (cnblogs.com)
(2条消息) WPF圆形环绕的Loading动画_LisenYang的专栏-CSDN博客(2条消息) WPF 大数据加载过程中的等待效果——圆圈转动_weixin_30716141的博客-CSDN博客(2条消息) WPF圆形环绕的Loading动画_LisenYang的专栏-CSDN博客
WPF 自定义滚动条(ScrollView、ScrollBar)样式 - 一叶知秋,知寒冬 - 博客园 (cnblogs.com)
[C#] 走进异步编程的世界 - 在 GUI 中执行异步操作 - 反骨仔 - 博客园 (cnblogs.com)
Using Async and Await to update the UI Thread – Stephen Haunts Freelance Trainer and Writer
** Final draft 2nd edition of ECMA-364 (ecma-international.org)
materialdesign 切换不同颜色主题的方法:定义同名SolidColorBrush到不同的Resource文件中,取不同的颜色值,切换主题颜色就是切换加载的Dynamic Resource源文件,DynamicResource会自动刷新同名资源的值
Generate and consume async streams | Microsoft Docs
Patterns - C# reference | Microsoft Docs IValueConverter
Design by Contract - Bertrand Meyer
partial method - C# Reference | Microsoft Docs partial class、method
yield 迭代器 nameof 抛异常 好维护
How to: Create a Binding in Code - WPF .NET Framework | Microsoft Docs
Index | 2,000 Things You Should Know About WPF (2000things.com)
WPF Performance Suite | Microsoft Docs
Optimizing WPF Application Performance | Microsoft Docs
Optimizing Performance: Data Binding - WPF .NET Framework | Microsoft Docs
Optimizing Performance: Taking Advantage of Hardware - WPF .NET Framework | Microsoft Docs
Windows下UI自动化工具Inspect - 风吹稻香 - 博客园 (cnblogs.com)
What are the best UI Test Automation Tools? (microsoft.com)
WinAppDriver and Desktop UI Test Automation (microsoft.com)
minimize WPF application into Taskbar - Stack OverflowWPF最小到系统托盘 - Arvin.Mei - 博客园 (cnblogs.com)
WPF 如何将软件的所有图片保存在DLL内供主程序调用_蓝山咖啡的博客-CSDN博客 这个地方的ResourceInclude应该是Resource... 定位半天为啥设计器能看到但是编译出来没显示
在Closing事件里阻止窗口关闭_自由是冠军-CSDN博客
日志使用 C#--Log4net配置 - 简书 (jianshu.com)
使用process做命令行交互 Redirecting Standard Input/Output using the Process Class (c-sharpcorner.com)
依赖事件、路由属性(缺OnRender,自绘)
WPF的自定义控件 依赖属性,DependencyProperty 路由事件RoutedEvent - 微星 - 博客园 (cnblogs.com)
装饰器(自绘)
WPF自定义控件 —— 装饰器 - Curry - 博客园 (cnblogs.com)
WPFSamples -> PhotoStoreDemo -> Style/DataTemplate/ControlTemplate/Trigger/
https://blog.csdn.net/chz_cslg/article/details/37354809 异型按钮?包含透明信息的图片做按钮? 背景动画 3d转场?
-------------------
IValueConverter
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/patterns#logical-patterns
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/generate-consume-asynchronous-stream
Design by Contract - Bertrand Meyer
partial class、method https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/partial-method
yield 迭代器 nameof 抛异常 好维护
swordfish的taskbar、controller、screen的多广播通信
控件:dependencyproperty onrender routedevent
telerik ui test studio devstudio 破解试用 学习其思想,这样学的最快(参考halcon)
-------------------
.NET方面的框架的整理和总结 - Fighter·齐 - 博客园 (cnblogs.com) *** 五星推荐
博客专家:
github参考链接:
- obfuscar/obfuscar: Open source obfuscation tool for .NET assemblies (github.com)
- thangchung/clean-code-dotnet: Clean Code concepts and tools adapted for .NET (github.com)
- dotnet/samples: Sample code referenced by the .NET documentation (github.com)
- patilshubham/ProDotnetDesignPatternFramework45: Design patterns are solutions to software design problems you find again and again in real-world application development. Patterns are about reusable designs and interactions of objects. The 23 Gang of Four (GoF) patterns are generally considered the foundation for all other patterns. They are categorized in three groups: Creational, Structural, and Behavioral (for a complete list see below). To give you a head start, the C# source code for each pattern is provided in 2 forms: structural and real-world. Structural code uses type names as defined in the pattern definition and UML diagrams. Real-world code provides real-world programming situations where you may use these patterns. A third form, .NET optimized, demonstrates design patterns that fully exploit built-in .NET 4.5 features, such as, generics, attributes, delegates, reflection, and more. These and much more are available in our .NET Design Pattern Framework 4.5. You can see the Singleton page for a .NET 4.5 Optimized example. (github.com)
- meysamhadeli/awesome-dotnet-tips: Curated list of awesome tips and tricks and resources in .net world. (github.com)
- Awesome-Windows/Awesome: 🎉 An awesome & curated list of best applications and tools for Windows. (github.com)
- quozd/awesome-dotnet: A collection of awesome .NET libraries, tools, frameworks and software (github.com)
- jasonhua95/awesome-dotnet-core: .NET Core库、工具、框架和软件的中文收录大全。 内容包括:库、工具、框架、模板引擎、身份认证、数据库、ORM框架、图片处理、文本处理、机器学习、日志、代码分析、教程等。 (github.com)
- danperor/awesome-csharp: A collection of awesome c# libraries, tools, frameworks, and software. (github.com)
- JGCompTech/SharpUltimateTools: A Large Repository Of Awesome Scripts For C#. (github.com)
- mehdihadeli/awesome-dotnet-async: A curated list of awesome articles and resources to learning and practicing about async, threading, and channels in .Net platform. 😉 (github.com)
- coding-daily/awesome-csharp (github.com)
- mzy666888/csharp-awesome: 这是汇集了在开发过程中使用到的或者在浏览GitHub中发现的优秀的C#/JavaScript可用的库
- JessicaBarclay/awesome-csharp: Awesome list of C# related libraries, tools and tutorials. Inspired by awesome-dotnet, awesome-dotnet-core, awesome-roslyn and awesome. (github.com)
- WildGums open source center WildGums - Imagine being in a candy shop (支持日志等众多实用控件库) GitHub - WildGums/Orc.LicenseManager: License Manager https://github.com/WildGums/Orc.LogViewer
Accord.NET Machine Learning Framework (accord-framework.net)
Learn and Practice Math - Math.net
通过WPF 模拟制作便携小空调_Cool2Feel的博客-CSDN博客
这些类库,架起一个健壮的C#项目 - 知乎 automapper
dotNet代码分析
- 静态分析:CodeMaid、SourceMonitor、Microsoft.CodeAnalysis
- 动态测试:Parasoft
以上是关于c# 小知识点的主要内容,如果未能解决你的问题,请参考以下文章
通达OA 小飞鱼OA实施法:以项目管理的方式来推进工作流设计项目实施
小飞鱼通达二开 为通达OA公告文件柜增加上传自动水印功能(图文)