public void Initialize(Z80NavBar.NavBarItem navItem, int width, Z80NavBar.Themes.ITheme theme, int depth) { _navItem = navItem; _theme = theme; _depth = depth; this.Height = navItem.Height; this.Width = width; this.BackColor = theme.BackgroundColor(depth); _initialized = true; }
/// <summary> /// This property can be use for change the current theme in Run-Time /// </summary> public void SetTheme(Z80NavBar.Themes.ITheme theme) { _theme = theme; DrawControlItems(); }
/// <summary> /// Initialize (and draws) the control. /// This method should de called only one time /// </summary> /// <param name="navbar">list of our navigation items</param> /// <param name="theme">theme applied to control</param> public void Initialize(List <Z80NavBar.NavBarItem> navbar, Z80NavBar.Themes.ITheme theme) { _navBarItems = navbar; _theme = theme; DrawControlItems(); }