protected void UpdateBarButtonItem(IMenuBarItem menuBarItem, BarItem barItem) { barItem.Id = menuBarItem.Id; barItem.Name = menuBarItem.Name; barItem.Description = menuBarItem.Description; barItem.Hint = menuBarItem.Description; barItem.Enabled = menuBarItem.Enabled; barItem.UpdateIcon(menuBarItem.Icon); barItem.ItemShortcut = new BarShortcut(menuBarItem.Shortcut); menuBarItem.EnabledChanged += (value => barItem.Enabled = value); menuBarItem.VisibilityChanged += (value => barItem.Visibility = value ? BarItemVisibility.Always : BarItemVisibility.Never); }