WPF Image Disappears

184 views Asked by At

I have a WPF application with a pop-up window. The window has a Image element that has a binding to Uri.

The image does not appear when the window loaded, when I do Snoop, and going through the visual tree, it suddenly appears.

Do you have an idea what the problem is, or at least how to hack it?

this is xaml:

A bit complicated for me to show the code that is spread over several controls. I hope it all:

 <Image Name="ImageService"
               Grid.RowSpan="4"
               Grid.ColumnSpan="2"
               Source="{Binding Path=Image}"
               Stretch="Fill" /> 

this image binding to dp property:

public ImageSource Image
{
    get { return (ImageSource)GetValue(ImageProperty); }
    set { SetValue(ImageProperty, value); }
}

This image in a single component. Window contains the component in the following way:

 Image="{Binding Header.ImageSource}"

the Header.ImageSource is

public object ImageSource
{
    get
    {
        return m_ImageSource;
    }
    set
    {
        m_ImageSource = value;
        OnPropertyChanged("ImageSource");
    }
}

Snoop screen

0

There are 0 answers