void SetToolbarVisibility(IBarManagerHolder template, bool visible){ foreach (Bar bar in template.BarManager.Bars) { if (bar.BarName == "ListView Toolbar" || bar.BarName == "Main Toolbar"){ bar.Visible = visible; break; } } }
void SetToolbarVisibility(IBarManagerHolder template, bool visible) { foreach (Bar bar in template.BarManager.Bars) { if (bar.BarName == "ListView Toolbar" || bar.BarName == "Main Toolbar") { bar.Visible = visible; break; } } if (template is ISupportActionsToolbarVisibility) ((ISupportActionsToolbarVisibility)template).SetVisible(visible); }
void SetToolbarVisibility(IBarManagerHolder template, bool visible) { foreach (Bar bar in template.BarManager.Bars) { if (bar.BarName == "ListView Toolbar" || bar.BarName == "Main Toolbar") { bar.Visible = visible; break; } } if (template is ISupportActionsToolbarVisibility) { ((ISupportActionsToolbarVisibility)template).SetVisible(visible); } }
void SetToolbarVisibility(IBarManagerHolder template, bool visible) { Frame.GetController <ToolbarVisibilityController>().ShowToolbarAction.Active[GetType().Name] = visible; foreach (Bar bar in template.BarManager.Bars) { if (bar.BarName == "ListView Toolbar" || bar.BarName == "Main Toolbar") { bar.Visible = visible; break; } } var visibility = template as ISupportActionsToolbarVisibility; visibility?.SetVisible(visible); }
private static void BuildMenu(IModelNavigationItems items, BarLinksHolder ctrl, IBarManagerHolder dock) { foreach (var x in items) { if (x.Items.Count > 0) { var sub = new BarSubItem(dock.BarManager, x.Caption); sub.LargeGlyph = ImageLoader.Instance.GetImageInfo(x.ImageName).Image; ctrl.AddItem(sub); BuildMenu(x.Items, sub, dock); } else { var item = new BarButtonItem(dock.BarManager, x.Caption); item.LargeGlyph = ImageLoader.Instance.GetImageInfo(x.ImageName).Image; ctrl.AddItem(item); } } }