private UIElement CreateControls(int? evntId, string evntName, string evntDescription) { m_userControl_evnt = new UserControl_Event(evntId, evntName, evntDescription, true); return m_userControl_evnt; }
private void CreateControls(int? evntId, string evntName, string evntDescription) { 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_modifyEvent = new Button() { Content = "Modify Event" }; button_modifyEvent.Click += Button_UpdateEvent_Click; grid_main.SetGridRowColumn(button_modifyEvent, 0, 0); m_userControl_evnt = new UserControl_Event(evntId, evntName, evntDescription, false); grid_main.SetGridRowColumn(m_userControl_evnt, 1, 0); m_userControl_evnt.SetActiveAndRegisterForGinTubEvents(); Border border = new Border() { Style = new Style_DefaultBorder(), Child = grid_main }; Content = border; }