display two textbox in customMessageBox?
c#, messagebox
Solution
use a `container control` to hold both `textboxes`
TextBox soora = new TextBox();
soora.Height = 72;
soora.Width = 150;
soora.MaxLength = 3;
TextBox ayath = new TextBox();
ayath.Height = 72;
ayath.Width = 150;
ayath.MaxLength = 3;
StackPanel container = new StackPanel{
Orientation = System.Windows.Controls.Orientation.Horizontal
};
container.Children.Add(soora);
container.Children.Add(ayath);
CustomMessageBox messageBox = new CustomMessageBox()
{
Title = "GO TO",
Content = container,
RightButtonContent = "Go !",
};
Problem
Well, I want to display two text boxes next to next in `customMessageBox`. So i have coded for two Text Boxes. like below. I named `soora` and `ayath` for it. But in `customMessageBox`, i cannot call two text boxes in the same time. It shows error. How to display two text boxes next to next in `customMessageBox`. I only the error and it is form `Content = soora + ayath` My C# CODE; ``` TextBox soora = new TextBox(); soora.Height = 72; soora.Width = 150; soora.MaxLength = 3; TextBox ayath = new TextBox(); ayath.Height = 72; ayath.Width = 150; ayath.MaxLength = 3; CustomMessageBox messageBox = new CustomMessageBox() { Title = "GO TO", Content = soora + ayath, RightButtonContent = "Go !", }; ```