public void AddNavigationItem(string name, Image selectedIcon, Image unselectedIcon) { CyberarmsSettingsNavigationItem item = new CyberarmsSettingsNavigationItem(); item.SelectedIcon = selectedIcon; item.DisplayName = name; item.UnselectedIcon = unselectedIcon; flowLayoutPanelNavigationItems.Controls.Add(item); item.NavigationClicked += new EventHandler(cyberarmsSettingsNavigationItem_Click); if (flowLayoutPanelNavigationItems.Controls.Count == 1) { item.IsSelected = true; OnNavigationChanged(item); } }
public void AddNavigationItem(CyberarmsSettingsNavigationItem item) { NavigationItems.Add(item); }