摘要:
探讨: 1、当引用资源时,选择StaticResource还是DynamicResource的考虑因素: (1)在哪里创建资源?(资源的范围或层级) a. 资源是在一个Page/Canvas/Window中? b. 在应用程序范围中? c. 在松散的Xaml中? d. 在某个特定的Object(比如某个特定的Button)中? 物件级:此时,资源只能套用在... 阅读全文
摘要:
public class EnumerationDataProvider : ObjectDataProvider
{ public Type EnumerationType { get; set; } public string NoneValue { get; set; } public string NoneDisplayValue { get; set; ... 阅读全文
摘要:
ContentControl VS ContentPresenter What's the difference between ContentControl and ContentPresenter? ContentPresenter is usually used in a ControlTemplate, as a placeholder to say "put the actua... 阅读全文
摘要:
What is the difference between these 2 bindings: and TemplateBinding - More limiting than using regular Binding More efficient than a Binding but ... 阅读全文
摘要:
DataTemplates Data Templating Overview Styling and Templating DataTemplate Class FrameworkTemplate Class Triggers Trigger Class DataTrigger Class MultiDataTrigger Cla... 阅读全文
摘要:
如何判断DataContext有修改: EF6的 using (var db = new Model1())
{ if (db.ChangeTracker.HasChanges()) { Console.WriteLine("Something has changed"); }
} EF5中: public bool Has... 阅读全文
摘要:
自定义Binding A base class for custom WPF binding markup extensions BindingDecoratorBase Code: public class LookupExtension : BindingDecoratorBase
{ //A property that can be set in XAML pu... 阅读全文