WPF Custom Control with Image problem

Posted by user311883 on Stack Overflow See other posts from Stack Overflow or by user311883
Published on 2010-04-10T15:39:05Z Indexed on 2010/04/10 15:43 UTC
Read the original article Hit count: 314

Filed under:
|
|
|

Hi all,

I am quite new to WPF/XAML and I am currently facing a problem.

I have a solution with two projects in it, the first project is a Custom Control Library with a custom Window form control inside. The second project is a WPF application using my custom window form.

All work fine except for the form Icon. In the WPF application project I set my window icon property to "/ProjectTwoNameSpace;component/Resources/Images/Film.ico", and in the WPF custom control I try to show that image that way :

<Image Grid.Column="0" Margin="3" Width="27" Height="27">
     <Image.Source>
        <BitmapImage UriSource="{Binding Path=Icon}" />
     </Image.Source>
 </Image>

But it doesn't work, I get a error at runtime saying that the property UriSource or StreamSource must be set for my tag.

Anyone can help me ? I think it's jsut a WPF newbie problem ^^

© Stack Overflow or respective owner

Related posts about wpf

Related posts about xaml