随笔分类 - -=WPF Projects=-
摘要:1:做Icon用Canvas还是DrawingBrush?Canvas的例子: ...
阅读全文
摘要:我有一个TabControl View Code 要实现上面的Behivor需要设计其trigger。方法一:设置一个trigger和一个MultiTrigger,其实不用写方法二:设置一个Trigger和一个DataTrigger说明的三点问题:MultiDataTrigger里...
阅读全文
摘要:1:binding后台bool[]数据以及后台ObservableCollection数据分别见下面xaml的Visibility和Text的Bindingpublic bool[] RubberTypeLegends { get { bool[] result = new bool[] {false,false,false }; for (int i = 0; i ...private O...
阅读全文
摘要:Case ID (?unit)红色的字根据一个后台boolean来做trigger,可以是Case or Open蓝色的字binding到后台的一个string属性来切换任意的Unit单位这样一共有6中组合:Case ID (in) OpenID (in)Case ID (cm) OpenID (cm)Case ID (mm) OpenID (mm)上图两个红圈的字分别控制显示那个Text代码如下: ...
阅读全文
摘要: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
阅读全文
摘要:http://stackoverflow.com/questions/183406/xaml-newline-in-string-attributehttp://www.developerfusion.com/community/blog-entry/8389974/wpf如果可以写template的话,直接给2个textblock排在一个stackpanel里,或者写如果不可以要写hexidecimal 表达换行
阅读全文
摘要:LabeledTextBoxControl:C#定义using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;namespace Halliburton.Castor.Controls{ class LabeledTextBoxControl : Control { public static readonly DependencyProperty LabelP...
阅读全文
摘要:What is DiffMergeDiffMerge is yet-another-diff-and-merge-tool from the fine folks at SourceGear. It’s awesome. It’s head and shoulders above whatever junky diff tool they provided with your source control platform, unless of course you’re already using Vault. Eric Sink, the founder of SourceGear, wr
阅读全文
摘要:问题外层MainWindow.xaml里有一个Container(ContentPresenter),调用一个CreateJob 页面,里面是一行行的,最后一个是。因为会调用不同的子页面,这个Containner(ContentPresenter)需要写清TabNavigation的方式,这里是Local而里面这些Textblock设置了一定顺序的Index,最后一个是的index是最大的。但是这个datapicker是由一个DataTemplate组成的,其再内层是一个TextBlock和一个Button组成。问题是KeyboardTab不会走到内层的DataPicker的Button中。解
阅读全文
摘要:Wilma项目中的例子:View Code 1 16 17 18 19 20 21 其中TargetNullValue和Binding的Path指定的后台property做对应,当后台pro...
阅读全文
摘要:Bool?属性切换不同控件方法1:换整个某个Custom的control的整个Template可以用DataTemplate的DataTrigger,用在collection里(ListView/DataGrid),特点是在Template外面,换Template例子:主要是换自定义的,用换在DT里的TemplateView Code ...
阅读全文
摘要:One question that has been coming up frequently over the past few days has been how to launchthe browserwhen the user clicks on a hyperlink. The answer is different for thebrowser and standalone cases:Browser (XBAP or Loose XAML)XBAPs and looseXAMLsupport special named targets for Hyperlink; these a
阅读全文
摘要:帮忙Steve写有关数据库的程序,需要一个AdvancedSearch的功能,使用xaml和C#实现ComboBox的数据录入AdvancedSearch.xaml: 1 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
阅读全文
摘要:Opening XAML files fast:Developing WPF screens in Visual Studio 2010 SP1 using the Windows Presentation Foundation Designer, even in code view, can still be a drag as it’s slow and especially when opening a file.Always open documents in full XAML viewThe first step is to not open the design view. To
阅读全文

浙公网安备 33010602011771号