Hi all,
I am really getting mad since 2 days with a stupid problem. I already have asked the question here but seem like my question in lost where nobody will see it again. So here is my simple problem :
I have a project containing a CustomControl (a library project), this custom control code is inherited from the Window control. So it have a Icon property inherited from it. In the XAML code to create the control design, somewhere in my ResourceDictionary I want to place an Image binded to the Icon property.
...
<Image Grid.Column="0" Margin="3" Width="27" Height="27" Source="{Binding Icon}" />
...
I have then a second project (a WPF application project) referencing my first one and using this custom control window, where I set the Icon property. The icon Property is correctly set cause I can see the icon in the task bar, but the Image doesn't appear, seem like my binding doesn't work.
<SILU:FlatForm x:Class="SILU_MovieManager.WinMain"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:SILU="clr-namespace:SILU_Controls;assembly=SILU_Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SILU Movie Manager" Height="425" Width="682" Loaded="FlatForm_Loaded" Icon="/SILU_MovieManager;component/Resources/Images/Film.ico">
<Grid>
</Grid>
</SILU:FlatForm>
I really don't know how to bind this, here is one solution I got here, but it doesn't work for me. (Solution)