我已经创建了一个这样的 CustomMessageBox:
TextBox tbName = new TextBox();
tbName.Text = "test";
tbName.Name = "tbName";
Grid grid = new Grid();
grid.Children.Add(tbName);
grid.Name = "grid";
CustomMessageBox mb = new CustomMessageBox()
{
Caption = "test",
Message = "message",
Content = grid,
LeftButtonContent = "ok",
RightButtonContent = "cancel"
};
mb.Dismissed += (e1, e2) =>
{
//how to get textbox text ?
};
mb.Show();
我想检索文本框内容,我该怎么做?
谢谢