is thrown when you are trying to set the Value of the txt_Name
. They are in the UserControl1
that is placed inside the SampleWin RadWindow
You are calling the RadButton_Click_2
method with the instance of Page1
, but the UserControl1 is not in the VisualTree of the Page1, it is in the VisualTree of the SampleWIn RadWindow, thus it cannot be found. This leads to SampleUC in RadButton_Click_2 to be null and trying to set
I suggest passing the RadWindow instance instead of the Page1 instance in RadButton_Click_2:
Then find the
using FindVisualChildren method.
I've prepared a sample project using this approach.
Please fin it attached.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.