c# - How do I reference a TextBox I added to a DataPager's ControlTemplate within a Silverlight UserControl? -


Using the Silverlight 3 release, I created a Silverlight user control that included a Datapiger and a datagreat. I have modified the DataPager ControlTemplate and have added a textbox with X: The name of the TestTextBox within the DataPager limit before the standard DataPager button, but I can not find any reference in the UserControl code behind that text box.

Back in the code (C #), I tried: text box my text box = it. GetTemplateChild ("TestTextBox") as text box, but myTextBox emits winds. I suspect that I need to work against the Datapagiger frequency, but I do not see any method for drilling in the datapazer's hair controls.

I do not have much experience with control templates, so I'm not quite sure how this issue is well worthwhile to turn on other useful resources here and useful. Can someone push me in the right direction?

I think you can findControl ("name")? Try it:

  Text Box TB = DetapEGar 1.FindControl ("TestTextbox") as text box;  

At least it rolls into ASP-NET, when you have a control inside the template or some things and you can not access it directly.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -