Content not cleared

2 posts, 0 answers
  1. Henk
    Henk avatar
    113 posts
    Member since:
    Apr 2006

    Posted 14 Jul 2009 Link to this post

    Hi,
    We encountered the following weird behavior: the  RadHtmlPlaceholder object is created in runtime as a child of a border wich is contained in a stackpanel The HtmlSource property of RadHtmlPlaceholder is programmatically set with a string(not an url).
    When loading everything works fine. Before adding another control the stackpanel is cleared using the method children.clear.  But then the content of the RadHtmlPlaceholder doesn't dissapear at all, the second content is superimposed above the first content . No problem when an url is set instead of a string.

    Henk
  2. Henk
    Henk avatar
    113 posts
    Member since:
    Apr 2006

    Posted 14 Jul 2009 Link to this post

    Hi All,

    We have solved the problem after a suggestion from Valentin to add invalidateArrange() method after the clear.  It does not solve the problem but when adding the UpdateLaypout() method everything works fine.

    The sequence for solving our problem is:
    1. Children.clear()
    2. InvalidateArrange()
    3. Updatelayout()

  3. DevCraft banner
Back to Top