Setting Frame.Content doesn't always work

Posted by dan gibson on Stack Overflow See other posts from Stack Overflow or by dan gibson
Published on 2010-05-31T09:09:30Z Indexed on 2010/05/31 9:12 UTC
Read the original article Hit count: 164

Filed under:

I have a Frame control and I'm setting the Content property. If I set it twice, first to one control then to another, it shows the first control instead of the second. If I display a message box after setting it the first time then it works fine (ie it displays the second control).

It's like I can only set Content once until the screen has been repainted. Calling Frame.UpdateLayout also doesn't help.

What should I call after setting Content so that I can be sure that Content is actually set to what I specify?

© Stack Overflow or respective owner

Related posts about wpf