private void CreateControls(int? itemId, string itemName, string itemDescription) { 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_modifyItem = new Button() { Content = "Modify Item" }; button_modifyItem.Click += Button_UpdateItem_Click; grid_main.SetGridRowColumn(button_modifyItem, 0, 0); m_userControl_item = new UserControl_Item(itemId, itemName, itemDescription, false); grid_main.SetGridRowColumn(m_userControl_item, 1, 0); m_userControl_item.SetActiveAndRegisterForGinTubEvents(); Border border = new Border() { Style = new Style_DefaultBorder(), Child = grid_main }; Content = border; }
private UIElement CreateControls(int? itemId, string itemName, string itemDescription) { m_userControl_item = new UserControl_Item(itemId, itemName, itemDescription, true); return m_userControl_item; }