• 2024-08-27WPF 数据校验
    一、新建NameValidationRule类publicclassNameValidationRule:ValidationRule{publicoverrideValidationResultValidate(objectvalue,CultureInfocultureInfo){varlength=value.ToString().Length;if(length
  • 2024-04-26PropertyChanged.Fody自动通知属性插件
    NuGet安装安装 PropertyChanged.FodyNuGet包并更新FodyNuGet包:InstallthePropertyChanged.FodyNuGetpackage andupdatethe FodyNuGetpackage:PM>Install-PackageFodyPM>Install-PackagePropertyChanged.Fody 这是必需的,因为NuGet始终默认为任何依
  • 2024-01-30wpf 数据绑定 执行流程
    数据绑定SimpleBinding\MainWindow.xaml<Windowx:Class="SimpleBinding.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  • 2023-11-29WPF MVVM 学习理解
    <StackPanel><TextBoxText="{BindingName}"/><TextBoxText="{BindingTitle}"/><ButtonHeight="50"Command="{BindingShowCommand}"/></StackPanel>数据上下文绑定:this.DataContex
  • 2023-07-01AnyCAD应用——修改指定点,线,面的坐标实现物体移动
    课题需求:三维模型位置随实物位置改变而动态改变的功能,通过顶点位置坐标的改变,修改模型在显示中的位置。功能验证:目前,可通过选中顶点手动输入坐标的方式,模拟验证此功能。首先,点击“文件”工具栏,选择导入实体,导入一个step文件,这是一种常用的三维实体模型格式。 voidOnOpen
  • 2022-09-24【WPF】ListView绑定自定义的ObservableDictionary,绑定 DataTemplate内的控件时候,命令会失效
    自定义类ObservableDictionary注意:(1)绑定字典时候要用Value.字段例如:Text="{BindingValue.Close,StringFormat={}{0:F2}}">,StringFormat={}{0:F2}是格式化字段usin
  • 2022-09-19WPF 输入文本检测是否为数字
     <Windowx:Class="WpfApp1.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.