- 博客(17)
- 收藏
- 关注
原创 Style
Style的x:Key属性,相当于在当前Window是资源中定义了一个名称为x:Key设定值的Style对象。如果没有设置x;Key,那么这个Style将对属于这个Window中所有CheckBox生效。首先设定的是Style的TargetType属性,它表示我们希望修改的目标类型。然后定义一个Setters的集合。每个Setter都表示修改的一个属性或者事件。Property设置属性名称,Va
2007-08-16 09:37:00
908
原创 ICollectionView刷新数据
using System;using System.Collections.Generic;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.In
2007-08-13 16:50:00
2354
原创 DataBinding(一)
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:src="clr-namespace:competition" Title="competition" Height=
2007-07-27 14:58:00
859
原创 WPF中的命令邦定
.cs文件中用法 private void BindCommands() { //[OK] CommandBinding cb = new CommandBinding(Commands.OK, OnOK); this.CommandBindings.Add(cb); this.OkButto
2007-07-06 14:10:00
1068
转载 何时使用委托而不使用接口
委托和接口都允许类设计器分离类型声明和实现。给定的接口可由任何类或结构继承和实现;可以为任何类中的方法创建委托,前提是该方法符合委托的方法签名。接口引用或委托可由不了解实现该接口或委托方法的类的对象使用。既然存在这些相似性,那么类设计器何时应使用委托,何时又该使用接口呢?在以下情况中使用委托: 当使用事件设计模式时。 当封装静态方法可
2007-06-20 00:19:00
791
转载 Windows API函数大全
1. API之网络函数 WNetAddConnection 创建同一个网络资源的永久性连接 WNetAddConnection2 创建同一个网络资源的连接 WNetAddConnection3 创建同一个网络资源的连接 WNetCancelConnection 结束一个网络连接
2007-06-19 14:07:00
1135
原创 WMI获取磁盘信息
private void GetAllDisk1() { foreach (ManagementObject drive in new ManagementObjectSearcher( "select * from Win32_DiskDrive").Get()) {
2007-06-19 13:57:00
3983
转载 How To Create Alternate Background In WPF?
Creating alternate background in WPF is a frequently asked question on MSDN WPF forum, and most answers to this question are borrowed from the three solutions posted several months ago by my compatr
2007-05-31 16:30:00
1026
原创 WPF Message
以下是在WPF中接收系统消息的方法,类似于c#里的WndProc函数 private HwndSource m_source; public const int WM_DEVICECHANGE = 0x0219; private void OnLoaded(Object sender,EventArgs e) {
2007-05-17 14:52:00
2264
原创 callback function
回调函数(callback function)是一种供系统调用的函数。在设置回调函数时,将你的回调函数的地址作为参数送给系统。当系统调用时(如事件发生,启动功能...),就自动会执行你的回调函数。程序本身不需要执行该函数。
2007-05-13 15:46:00
728
原创 WPF Window's style
private void OnLoaded(Object sender, EventArgs e) { int nStyle = Win32API.GetWindowLong(new WindowInteropHelper(this).Handle, Win32API.GWL_STYLE); nStyle &= ~Win
2007-05-10 08:49:00
1081
转载 Callbacks with Delegates [转]
爸爸:“儿子,去把院子里的草割一下。我看会儿报。” 儿子:“爸爸,我把院子打扫干净了。” 儿子:“爸爸,我给割草机加了油。” 儿子:“爸爸,割草机发动不了。” 爸爸:“我来发动它。” 儿子:“爸爸,我把草割好了。” 这个就是回调处理的例子。爸爸给儿子指派一项任务,儿子报告任务进展。在爸爸等待儿子完成工作的时
2007-05-07 14:44:00
775
转载 ControlTemplate[转]
WPF中的ControlTemplate(控件模板)出处:http://zhouyinhui.cnblogs.com/ WPF包含数据模板和控件模板,其中控件模板又包括Contro
2007-05-07 13:48:00
1047
转载 WPF动画[转]
WPF中的动画 来自: http://zhouyinhui.cnblogs.com/ 动画无疑是WPF中最吸引人的特色之一,其可以像Flash一样平滑地播放并与程序逻辑进行很好的交互。这里我们讨论一下故事板。在WPF中我们采用Storybo
2007-05-07 13:36:00
2402
1
原创 WPF DataTemplate_DataTrigger Animation
今天找到个明白人,终于把DataTrigger里的动画搞出来了 Storyboard.TargetName="ImageBorder"
2007-02-02 16:46:00
1703
原创 DockPanel布局
WPF基本来说是一个做界面的新技术,它把source同界面分离。DockPanel:用于设计界面布局 可以在Window中设置多个DockP
2007-01-25 13:17:00
1802
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人