private void CreateControls(int? messageChoiceId, string messageChoiceName, string messageChoiceText, int messageId) { Grid grid_main = new Grid(); grid_main.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); grid_main.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto }); Button button_modifyMessageChoice = new Button() { Content = "Modify MessageChoice" }; button_modifyMessageChoice.Click += Button_UpdateMessageChoice_Click; grid_main.SetGridRowColumn(button_modifyMessageChoice, 0, 0); m_userControl_messageChoice = new UserControl_MessageChoice(messageChoiceId, messageChoiceName, messageChoiceText, messageId, false, true); grid_main.SetGridRowColumn(m_userControl_messageChoice, 1, 0); m_userControl_messageChoice.SetActiveAndRegisterForGinTubEvents(); Border border = new Border() { Style = new Style_DefaultBorder(), Child = grid_main }; Content = border; }
private UIElement CreateControls(int? messageChoiceId, string messageChoiceName, string messageChoiceText, int messageId) { m_userControl_messageChoice = new UserControl_MessageChoice(messageChoiceId, messageChoiceName, messageChoiceText, messageId, true, false); return m_userControl_messageChoice; }