Browse by Tags
All Tags »
WPF (
RSS)
Dependency Properties and Routed Events are special WPF mechanisms that can be used in place of the CLR's normal Properties and Events, since they are more powerful, although less typed. You can even define a dependency property or routed event without a matching property or event and one can access...
[ Caveat : This is constructive criticism about XAML and the current version of WPF. They both have their strengths and things I love about them and they both may become better over time, but this is about what we have today.] After Tomer published his list of 10 Reasons to Love XAML , I wrote a long...
Here's a collection of performance related information I find useful: Optimizing WPF Application Performance at MSDN. WPF Performance Whitepaper at Kiran Kumar's blog. Much of the content is similar in both links. WPF Performance Blog . And here's another document I loved when I first got...
After realizing the project I'm working on is in need of two features that do not exist in WPF - one being a missing feature , the other being a bug - I decided to take action and write something that would allow one to write code that is currently an unsupported scenario. First, let's take a...
< TextBlock > < TextBlock.Text > < MultiBinding > < MultiBinding.Converter > < local : UnwrapperConverter /> </ MultiBinding.Converter > < Binding ... > < Binding.Converter > < local : WrapperConverter /> </ Binding.Converter > </ Binding...
Delegate Contravariance is a really cool feature in C# that is often overlooked, mostly because it is so implicit and "obvious". Go read the example I linked to if you don't know what it is (it's a short one). The following code, however, will not compile, even though you'd expect...
I encountered a problem today, the solution to which some of you may find worth keeping note of. One of the user controls in my Window had to sit inside a fancy container. Obviously, I didn't want to mix plainly visual elements with my logical ones (and also allow the graphic designers to work in...
There are quite a few sources about how to create dynamic menus (menus that are not embedded in XAML or code, but rather loaded from an external file): Loose XAML - Using the XamlReader , one can load an external, non-pre-compiled fragment of XAML, much like the one presented here: < MenuItem xmlns...
Building on the work started by William Kempf , I set out to make using the WeakEvent Pattern simpler and more readable. My intention was to make sure the user would have to write the minimum amount of code to use it, in order to draw it closer to the more intuitive model of strongly referenced events...
You can't. Well, that was the short version of things. Now comes the long one. Take the following piece of XAML: < Label x : Name ="color"> < MultiBinding Converter ="{ StaticResource luminanceConverter }"> < Binding Path ="AddedLuminance" /> < MultiBinding...
Haven't you always wanted to use a combo box like the one in Start menu's Run dialog? A client asked me for the exact same thing, and now you can download it from here too. The Automatically Filtered ComboBox inherits from the original ComboBox and adds the auto-filtering, along with an ability...
Sebastien Lambla wrote a cool post about how to correctly get notifications for the changes in dependency property values . In a nutshell: DependencyPropertyDescriptor prop = DependencyPropertyDescriptor.FromProperty( MyType.MyDependencyProperty, typeof (MyType)); prop.AddValueChanged( this , this .OnMyDependencyPropertyChanged...