摘要: 在 WPF 中,TabControl 可以直接将 ItemsSource 绑定数据源,见将 TabControl 绑定到数据的示例http://msdn.microsoft.com/zh-cn/library/aa972130(VS.90).aspxCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->匪疑所思的是,TabControl.ItemTeplate 居然是用于 Header, ContentTemplate 才是用于 TabItem。但 阅读全文
posted @ 2013-09-09 13:51 法的空间 阅读(448) 评论(0) 推荐(0) 编辑
摘要: —目的 如果要在XAML里引用静态或动态对象实例,或在XAML中创建带有参数的类。这时,我们需要用到XAML扩展。XAML扩展常用来设定属性值。使用标识扩展,告诉 XAML 处理不要像通常那样将属性值视为文本字符串,而是通过类型转换把字符串转换为静态或动态实例。—格式 当XAML编译器看到大括号{}时,把大括号中的内容解释为XAML标记扩展。 如: 有两个标识扩展,一个是Binding标识扩展,一个是StaticResource扩展。—说明 1、标记扩展本身是一系列类,其基类为MarkupExtension(抽象类)。 2、从这个类中派生出十二个类,即:ResourseKey、 TypeEx. 阅读全文
posted @ 2013-08-27 10:59 法的空间 阅读(415) 评论(0) 推荐(0) 编辑
摘要: http://laughingchs.iteye.com/blog/1169986工厂方法模式:一个抽象产品类,可以派生出多个具体产品类。 一个抽象工厂类,可以派生出多个具体工厂类。 每个具体工厂类只能创建一个具体产品类的实例。抽象工厂模式:多个抽象产品类,每个抽象产品类可以派生出多个具体产品类。 ... 阅读全文
posted @ 2013-08-13 18:02 法的空间 阅读(168) 评论(0) 推荐(0) 编辑
摘要: View Code xaml public class WaterMarkTextBox:TextBox { public string Watermark { get { return (string)GetValue(WatermarkProperty); } set { SetValue(WatermarkProperty, value); } } // Using a DependencyProperty as the backing store fo... 阅读全文
posted @ 2013-08-09 09:32 法的空间 阅读(425) 评论(0) 推荐(0) 编辑
摘要: (_S) View Code 阅读全文
posted @ 2013-08-02 10:50 法的空间 阅读(253) 评论(0) 推荐(0) 编辑
摘要: void mydataGird_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Point aP = e.GetPosition(mydataGird); IInputElement obj = mydataGird.InputHitTest(aP); DependencyObject target = obj as DependencyObject; int i = 0; while (target !... 阅读全文
posted @ 2013-07-13 23:22 法的空间 阅读(767) 评论(0) 推荐(0) 编辑
摘要: /// /// AutoCompleteComboBox /// public class AutoCompleteComboBox : ComboBox { #region DependencyProperty public string WaterMark { get { return (string)GetValue(WaterMarkProperty); } set { SetValue(WaterMarkProperty, value); } } ... 阅读全文
posted @ 2013-07-10 19:39 法的空间 阅读(326) 评论(0) 推荐(0) 编辑
摘要: xaml View Code csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.I... 阅读全文
posted @ 2013-07-07 12:22 法的空间 阅读(600) 评论(0) 推荐(0) 编辑
摘要: -- =============================================-- Author: -- Create date: -- Description: -- =============================================CREATE PROCEDURE [dbo].[USP_PM_SearchPatronByCriteria] @IsActive bit = NULL, @PatronNo bigint=NULL, @BirthDate date=NULL, @PNFirstN... 阅读全文
posted @ 2013-07-05 18:04 法的空间 阅读(483) 评论(0) 推荐(0) 编辑
摘要: ... 阅读全文
posted @ 2013-07-04 19:18 法的空间 阅读(223) 评论(0) 推荐(0) 编辑