- 博客(9)
- 资源 (4)
- 收藏
- 关注
原创 WPF 路由事件声明及触发
public class FullScreenEventArgs : RoutedEventArgs { public Boolean Status { get; set; } } [Serializable] [ComVisible(true)] public delegate void FullScree...
2018-08-31 16:49:51 506
原创 WPF MVVM UserControl 的 i:Interaction.Triggers 应用
本例依赖文章 https://blog.csdn.net/Vblegend_2013/article/details/81634020用户控件代码 /// <summary> /// 声明路由事件 /// 参数:要注册的路由事件名称,路由事件的路由策略,事件处理程序的委托类型(可自定义),路由事件的所有者类类型 /...
2018-08-27 17:43:38 8779
原创 WPF 中 ItemsControl 列表的应用
wpf<Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="...
2018-08-24 09:35:48 5024 1
原创 WPF封装控件时 检测是否在设计模式中
public static bool IsDesignMode(this Control ctl) { return System.ComponentModel.DesignerProperties.GetIsInDesignMode(ctl); } 在控件和窗口的构造函数 或 load 中 this...
2018-08-23 17:34:07 487
原创 WPF窗口默认TextBox焦点
当WPF窗口显示后 如果想设置某个输入框为默认焦点 使用 FocusManager<Grid FocusManager.FocusedElement="{Binding ElementName=inputbox}"> <TextBox Name="inputbox" HorizontalAlignment="Left" Height="24" Margin...
2018-08-17 09:01:23 4961 2
原创 WPF MVVM 文本框 按回车触发Command
<TextBox HorizontalAlignment="Left" Height="24" Margin="10,10,0,0" Text="{Binding SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextWrapping="...
2018-08-15 16:19:11 6564
原创 WPF MVC模式下的事件路由和Command
1.引用DLLC:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries\System.Windows.Interactivity.dll2.建立Command接口 public interface IDefaultCommand { even...
2018-08-13 17:39:32 1742
原创 C# 中 Union的实现
using System;using System.Collections.Generic;using System.Linq;using System.Runtime.InteropServices;using System.Text;namespace ConsoleApplication{ [StructLayout(LayoutKind.Explicit, Size...
2018-08-10 16:45:51 4640
原创 树莓派 cmake 编译HP-Socket
刚到手树莓派不久 对linux也是一知半解所以在编译HPSOCKET组件的时候走了很多弯路 CMakeList文件 保存下 Linux目录建立 Build文件夹 在 Build文件夹1. cmake ..2. sudo make -j4 linux目录下 CMakeList.txtPROJECT(HPSocket4C)CMAKE_MINIMU...
2018-08-08 21:10:02 1563 1
C# 优雅的 APIHOOK 支持X86+X64源码
2018-09-21
C# 从内存加载动态链接库
2018-09-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人