This project has moved and is read-only. For the latest updates, please go here.

Bitmap Source Binding

Feb 17, 2009 at 6:50 PM
Edited Feb 17, 2009 at 11:22 PM
I have used Image for displaying 64px icons, so far. Something like

<Image Source={Binding Icon}/>

Now, I wanted to use Bitmap from WPF Contrib. The problem is that if I define Source for Bitmap as string, it renders just fine, but if I try:

<avalon:Bitmap Source={Binding Icon}/>

nothing shows. The Icon property returns BitmapImage type. Any ideas?
Feb 17, 2009 at 11:21 PM
Here is additional info:

System.Windows.Data Warning: 58 : BindingExpression (hash=12408161): Attach to Avalon.Windows.Controls.Bitmap.Source (hash=38972574)
System.Windows.Data Warning: 60 : BindingExpression (hash=12408161): Use Framework mentor <null>
System.Windows.Data Warning: 63 : BindingExpression (hash=12408161): Resolving source
System.Windows.Data Warning: 65 : BindingExpression (hash=12408161): Framework mentor not found
System.Windows.Data Warning: 61 : BindingExpression (hash=12408161): Resolve source deferred
Feb 18, 2009 at 12:59 PM
Found a solution (not sure if its final):

- inherit from FrameworkElement (not UIElement)
- override MeasureOverride (not MeasureCore)
Feb 19, 2009 at 9:31 AM
I'm not sure why this happens. This control was written by Dwayne Need (
Glad you got it working.