I would like to know when using some third party silverlight controls that are a container control why the controls that are conatined within them are not accessable in code behind. until the control is loaded. The example I am looking at is when using the FlipControl written by Mike Taulty.
Whehn I use his control and place a grid in the front container and texblocks in the behind container. only the grid is availabe at runtime until the flip is done that then show the behind container that then fires the load event of the text block. I woudl liek to populate these textblock before the flip is done but when I do I get object reference error because the textblock is null.
Any help on this would be great, here is mikes blog on this.
Thanks in advance.
-
Although I'm not actually looking at Mikes code (you could do that though) I would imagine he has a single content control to which he has assigned the Front content originally. On Flip a projection is animated until its edge on at which point the Rear content is assigned, and the animation continues.
Hence at anyone time the only one of Front or Rear content can actually be navigated to with something like
FindName
However if you give each of the root Child controls that you place in Front and Rear their own
x:Name
you should be able gain access to your text boxes using the rear name.Roy Glunt : I have also had this same problem with say telerik tab control, when objects are on another tab i get the same object reference error in code behind untill i change to that tab, but i will try you X: name methodology and see if that fixes the issue.
0 comments:
Post a Comment