public void AddToolButton(ToolButton button, string category) { button.DrawingHost = DrawingHost; var panel = GetTabPanelByCategory(button, category); panel.Panel.Children.Add(button); button.ParentPanel = panel; }
public TabPanel GetTabPanelByCategory(ToolButton button, string category) { var result = GetPanel(category); if (result == null) { result = CreateTabPanel(button, category); } return(result); }
private TabPanel CreateTabPanel(ToolButton button, string category) { var result = new TabPanel() { Category = category, Panel = new WrapPanel(), HeaderContent = (Settings.ShowIconInTabPanelHeader) ? new ButtonGrid(button.CloneIcon(), category) : new ButtonGrid(null, category) }; Items.Add(result); return(result); }
private TabPanel CreateTabPanel(ToolButton button, string category) { var result = new TabPanel() { Category = category, Panel = new WrapPanel(), HeaderContent = (Settings.ShowIconInTabPanelHeader) ? new ButtonGrid(button.CloneIcon(), category) : new ButtonGrid(null, category) }; Items.Add(result); return result; }
public TabPanel GetTabPanelByCategory(ToolButton button, string category) { var result = GetPanel(category); if (result == null) { result = CreateTabPanel(button, category); } return result; }