Eto Panel read input form not-loaded controls (on inactive different panel)

I have a few panels on my ETO form that are switched back and forth with a “next” “back” buttons. Say I have panel 1 and 2.
when a command is triggered on panel 2, form which the command requires to read a Textbox.Text input from panel 1, but since the Textbox itself is not loaded, it does not seem to hold the updated text input from the user (but only holds the default value created on load).

There must be a way to make Eto Panels keep these unloaded controls’ values since if I go back to panel 1, it remembers the value that was changed by the user…

I must be missing something regarding this… Thanks for any help or ideas!

Hi @dchang1,

I’m not sure we can help without saving sample code that we an run here.

Are you using view models to drive the panels?

– Dale

The way I handle multiple panels is to constantly pass a class back and forth between them with the data so that when the form regenerates, it uses the old values.

Thanks I end up doing the same…
making my input two-way-bind with that class I pass between panels!

Thanks Dale. I think I figured it out. Will post some lines of code here incase anyone else needed this.

TextBox myBox = new TextBox();
myBox.Bind<string>("Text", myClass, "Value", DualBindingMode.TwoWay);

Ended up doing 2-way binding between the text-box input and the param myClass.Value with the myBox.Text

this way even if the text-box isn’t loaded, the class keeps the value up to date.