WPF DatePicker – BlackOutDates Data Binding

A problem with DatePicker is that BlackoutDates collection cannot be initalized without a Calendar instance. So in MVVM environment, it is bit hard to bind BlackoutDates dynamically. But attached properties are a handy way to handle these type of situations. An attached property of type List<DateTime> can be used to achieve this. The dates will... Continue Reading →

Awaitable storyboard in WPF

Normally when a storyboard is running, setting the FillBehavior (Learn more about FillBehavior) to HoldEnd is risk. Because for a dependency property, storyboard is considered to have highest priority of setting the value. So once storyboard is done, user cannot change its value locally. So users prefer the set the FillBehavior to Stop and change the target... Continue Reading →

Visual Tree Helpers

WPF User Interface is represented in a way of tree. There are two ways that the complete object tree is conceptualized and can be reported to its public API: as the logical tree and as the visual tree. The Logical tree does not contain the core controls of WPF. For example, the child object of a ContentControl... Continue Reading →

Text Highlight in WPF

Whenever there is a search scenario or filter situation, it would be really good if the filtered text will highlight in the given result. In Windows 8 search, this is the case and it looks good. But the bad thing is, Microsoft does not provide a direct way to highlight a specific text in textblock. But... Continue Reading →

Up ↑