コード例 #1
0
 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;
         }
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 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);
         }
     }
 }
コード例 #6
0
 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);
         }
     }
 }