• 2023-12-13[转][C#][WPF]原生使用 ICommand
    传参这里参考:https://www.cnblogs.com/zhlziliaoku/p/5867556.html界面上添加一个按钮 <ButtonContent="点击"Width="120"Height="31"Command="{BindingshowCommand}"CommandParameter="{BindingRelativeSource={RelativeSourcese
  • 2023-05-10命令
    //利用委托传递成员函数eg: <ButtonCommand="{BindingShowCommand}"/>绑定了类里面的某个成员//在.xaml.cs中实例化 this.DataContext=newMainViewModel();//创建新的类库publicclassMainViewModel{publicMainViewModel(){
  • 2022-12-05.Net和SqlServer的事务处理实例
    1,SqlServer存储过程的事务处理一种比较通用的出错处理的模式大概如下:CreateprocdureprInsertProducts( @intProductIdint, @chvProductNamevarchar(30), @intPr
  • 2022-09-03【WPF】六、WPF命令(ICommand)
    使用Command可以实现UI层跟业务层分离,不必在UI层定义事件方法,近而减少耦合。下一章是关于内容变更在界面上重新展示。界面展示_UI层<Windowx:Class="WpfApp1.Window5"