A .Net Developer

All Posts

WPF : Validation

Validation Rule 简单示例 class ViewModel { public int Number { get; set; } } TextBox TextBox.Text Binding Path=Number UpdateSourceTrigger=PropertyChanged Delay=200 /Binding /TextBox.Text /TextBox 示例中由于绑定的属性Number是int型(int在绑定到界面上时会自动添加int⇋string的converter),所以当我们输入非数字时,converter抛出的转换异常会被捕获到,此时Textbox上会出现红色边框。 异常被捕获 描述错误的实际消息存储在 System.Windows.Controls.ValidationError 对象的 …

.Net WPF Validation

Reading Revit File Without Revit

Starting the main Revit program needs to be accompanied by loading multiple components, which usually takes a long time. This is especially annoying after the file automatically calls the wrong version of Revit! So is there any way to read the Revit program without opening Revit? It should be clear that it will be very difficult not to read or modify member information in Revit (there may be …

Revit Ole Storage COM Structured Storage

Merge Multiple .Net Assemblies Into One

When we use a lot of external dependencies, the generated folder may contain a lot of Dlls that are not conducive to distribution. Before Here are two ways to pack multiple assemblies into one. Costura.Fody Costura is an add-in for Fody. Fody is an extensible tool for weaving .net assemblies. It enables the manipulating the IL of an assembly as part of a build. Costura is easy to use. Install …

.Net IL Merge Fody


云起源与影响 云起源与影响 云特性与云模型 云特性与云模型 云使能技术——网络和Internet架构 网络和Internet架构 云使能技术——数据中心技术 数据中心技术 云使能技术——虚拟化技术 虚拟化技术 云使能技术——Web、多租户、服务技术 Web、多租户、服务技术 云使能技术——云安全 云安全

Book Notes Cloud

Improve Sound Quality By Equalizing Headphone Frequency Responses

Frequency response, which describes the response of the headphones to audio at different frequencies. The closer the waveform to the original audio, the higher the degree of reduction of the headphones , and to a certain extent it represents the quality of the headphones. DT770 Pro It's a very complex process from playing to being heard, for example: Raw Audio-Mixer-DSP Algorithm-DAC-Preamp …

Headphone Audio Equalizer APO

WPF基础Ⅱ: 依赖属性

依赖属性 与.Net属性对比: 更高效 支持附加功能 更改通知 属性值继承 创建依赖属性 /// summary /// 只能为依赖对象添加依赖属性 /// /summary public class DependencyClass : DependencyObject { /// summary /// 定义依赖属性 /// 约定俗成命名规则:属性名+Property /// /summary public static readonly DependencyProperty NumberProperty = DependencyProperty.Register(//注册依赖属性 Number, //属性名 typeof(int), //属性类型 …

.Net WPF


基础 XAML单位 一个设备无关单位被定义为1/96英寸 标准Windows dpi为96 dpi 设备无关单位 * 系统dpi = 实际像素数 (eg: 1/96英寸 * 96dpi =1像素) XAML命名空间 使用特殊特性 xmlns 声明命名空间 命名空间可使用XML名称空间或者**.Net名称空间** # XML名称空间 使用URI xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml # .Net名称空间 使用类的完整名称 xmlns:Prefix=clr-namespace:Namespace;assembly=AssemblyName XAML属性 简单属性 可直接设置属性值 Grid …

.Net WPF


随着家里需要用网络的设备日益增多,硬路由的性能瓶颈逐渐浮现.加上外部网络环境的糟糕(DNS胁持,HTTP胁持),每个设备单独配置网络环境又很麻烦. 于是乎在基友的安利下决定选择软路由来作为解决方案. Hardware Configuration Router - 机箱:BRZHiFi CUBE-6 - 主板:ASRock A320M-ITX - CPU:AMD 2200G - 内存:G.SKill Trident Z 16G DDR4 - 电源:SeaSonic SFX 450W - 网卡:Intel I350-T4v2 - 硬盘:LiteON T9 256G+HGST 1T 选择CUBE-6而不是一般的A4机箱的原因是想同时作为NAS设备使用,需要安装3.5寸硬盘的空间.单纯软路由的话还是选择小巧的A4机箱就好. 而网卡的选择上可根据个人需要进行选择(比如廉价的OCP万兆网卡方案),我这 …

Network Router

Delete Enterprise Applications In Azure Active Directory

Problem When we want to delete an Azure AD,one of the steps is to delete all enterprise applications in that directory. AAD Remove Check But some applicatons like Azure DevOps can not delete directly (Option not available). DevOps Delete Options Solution With PowerShell Create a new user in Azure AD with a role of Global administrator. Create new user Start PowerShell and install Azure AD module. …

Azure AzureAD

Generate a True Metafile in .NET

A few days ago when I was building the MS-OLEDS file for AutoCAD, I needed to create a Metafile as part of it. However, I encountered some small problems when using the built-in API. The Problem with Built-in API In System.Drawing.Imaging has a Metafile Class that allows us do a sequence of graphics operations on it.Here is my code and the test file in the HEX editor. public static void …

.Net Metafile