public ucCustomAnswerTest(CustomAnswerQuestion question) { InitializeComponent(); this.question = question; lbQuestion.Text = question.Text; lbQuestion.Left = (this.Width - lbQuestion.Width) / 2; tbAnswer.Left = (this.Width - tbAnswer.Width) / 2; }
public ucCustomAnswerTest(CustomAnswerQuestion question) { InitializeComponent(); tbQuestion.DataBindings.Add("Text", question, "Text"); tbCorrectAnswer.DataBindings.Add("Text", question, "CorrectAnswer"); }