How to force a wpf control to repaint or re-render? RRS feed

  • Question

  • I want to change the content  of a button (dynamically created) it is not changing for two to three clicks. content of the button is image.
    On clcik of some other button, I need to change the image of this dynamically created button or hyperlink with image.

    Is there a way to force wpf controls to refresh? I tried even calling refresh method on button, image.
    Nothing worked.

    If the screen is a small one for testing purpose, it is working. But in real case, where I have lots of controls in screen, image is not chaging.

    Changing the text of any textblock, hiding of grid these are working. But hiding of dynamic  buttn, changing image of dynamic button is not working.

    What could be the problem?
    Thanks in advance
    Friday, February 5, 2010 6:25 AM