08 2013 档案
摘要:https://github.com/vjpr/healthkick/blob/master/src/win/healthkick/ucSpinnerCogs.xaml网上的例子,放在UserControl里Castor project 放在 Windows里 ...
阅读全文
摘要:http://www.thomaslevesque.com/2011/03/21/wpf-how-to-bind-to-data-when-the-datacontext-is-not-inherited/The DataContext property in WPF is extremely handy, because it is automatically inherited by all children of the element where you assign it; therefore you don’t need to set it again on each elemen
阅读全文
摘要:需要用到code behind注意要给需要访问的元素命名x:Name="PART_TextBlock" custom control的程序部分using 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.Input;us
阅读全文
摘要:TemplateBinding:TemplateBinding是一个Markup Extension1: 不适用在frezable property、controltemplate trigger、 two way binding、 value converter、only support Dependent Property。其实TemplateBinding是下面Text Binding的short cut。TemplateBinding有limitation,只能1way binding 到使用ControlTemplate的 Parent Control2:如果需要2way bindi
阅读全文
摘要:UserControlUserControl实际上就是ContentControl,xaml里tag之间包含的实际就是后台程序的UserControl.Content属性所付的值。如下UserControl.Content包含一个Grid,里面有TextBox和Button.所以可以run time改变usercontrol包含的内容。1:什么时候用UserControl:UserControl是多个已存在control组成的,为复用做准备(比如一个Context Form包含很多基础input,combobox textblock等,之后多次复用)不需要复杂的customzation的时候,
阅读全文
摘要:http://stackoverflow.com/questions/183406/xaml-newline-in-string-attributehttp://www.developerfusion.com/community/blog-entry/8389974/wpf如果可以写template的话,直接给2个textblock排在一个stackpanel里,或者写如果不可以要写hexidecimal 表达换行
阅读全文

浙公网安备 33010602011771号