c# - Error Binding ImageSource to ImageBrush -


i have class called myuser. contains public property "image" follows

private imagesource _image;  public imagesource image {     { return _image; }     set     {         if (value != _image)         {             _image = value;             onpropertychanged("image");         }     } } 

i have wpf usercontrol contains setter fill path user's image. (user myuser object viewmodel)

<setter property="fill">     <setter.value>         <imagebrush imagesource="{binding path=user.image}"                     stretch="uniformtofill" />     </setter.value> </setter> 

i getting error during runtime (not exception)

system.windows.data error: 2 : cannot find governing frameworkelement or frameworkcontentelement target element. bindingexpression:path=user.image; dataitem=null; target element 'imagebrush' (hashcode=21084988); target property 'imagesource' (type 'imagesource')

the image showing fine. why getting error? should concerned about?

thanks help! mo

please read answer of similar error message. microsoft says it's minor bug in wpf not worthy looked @ beacuse not effect runtime behavior.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -