I currently need to get the content information within the textbox(s) with a groupbox, these textbox(s) have same first five characters. I’m pretty new at WPF C# and have read a few posts about the need to dig down within the layer(s) using the grid as control within the groupbox but just wanting a cleaner picture or cleaner code to do this action.
Structure:
- GroupBox
- Grid
- Grid
- StackPanel
- TextBox
- StackPanel
- Grid
- Grid
In window forms I used this but wanting to do the same thing using WPF:
for (int i = 0; i < (int)NudLengtht; i++)
{
if (!Byte.TryParse(((TextBox)GrpMessage.Controls.Find(“TG_TxtData” + i.ToString(), true)[0]).Text, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out datat[i]))
AddMessage(LstStatus, “Error converting data to send:” + ((TextBox)GrpMessage.Controls.Find(“TG_TxtData” + i.ToString(), true)[0]).Text);
}
cmgossettattnet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.