I am making UWP app.I have a TextBox
in xaml code in one class. I have given x:FieldModifier=public
in its property so that it is accessible outside the class. I want to use in another class where it should get enable when toggle switch is on.
So,I am making object of the class and using like this
fnp.text.IsEnabled=true
fnp is the object of class and text is name of textbox. but it is not firing.
How do i do that?
firstnavigatepage fnp = new firstnavigatepage();
public peoplechatting()
{
this.InitializeComponent();
}
public void MyToggle_Toggled(object sender, RoutedEventArgs e)
{
ToggleSwitch toggleSwitch = sender as ToggleSwitch;
if (toggleSwitch != null)
{
if (toggleSwitch.IsOn == true)
{
MyEllipse.Fill = new SolidColorBrush(Colors.Green);
toggleSwitch.OnContent = "Bot";
fnp.text.IsEnabled = true;
}