Users Pricing

forum

Home Forums Editing XAML textbox not from MainPage class – MindStick

Editing XAML textbox not from MainPage class

Mark Devid 3394 29 Mar 2014

I have the MainPage class which I can edit the contents of the XAML textbox from using this code

box1.Text = "";

however trying to edit the textbox from another class the following code will do not work

MainPage.box1.Text = "";

The error is "An object reference is required for the non-static field, method or property 'class.MainPage.box1' I have tried everything like making static functions and creating new MainPage objects in the other class but nothing has worked.


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md