Exemplo n.º 1
0
 protected virtual void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e)
 {
     if (this.MenuItemRendering != null)
     {
         this.MenuItemRendering.Invoke(this, e);
     }
 }
Exemplo n.º 2
0
        protected virtual bool CheckRender()
        {
            Type myType = this.GetType();
            DynamicMenuItemControlType ctrlType = DynamicMenuItemControlType.Command;

            if (!Enum.TryParse <DynamicMenuItemControlType>(myType.Name, out ctrlType))
            {
                ctrlType = DynamicMenuItemControlType.Command;
            }

            DynamicMenuItemRenderingEventArgs eArgs = new DynamicMenuItemRenderingEventArgs(this._menuItem, ctrlType);

            this.OnMenuItemRendering(eArgs);
            return(!eArgs.Cancel);
        }
Exemplo n.º 3
0
 protected void ctrl_MenuItemRendering(object sender, DynamicMenuItemRenderingEventArgs e)
 {
     this.OnMenuItemRendering(e);
 }
Exemplo n.º 4
0
 protected void childCtrl_OnRendering(object sender, DynamicMenuItemRenderingEventArgs e)
 {
     this.OnMenuItemRendering(e);
 }
Exemplo n.º 5
0
 protected void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e)
 {
     if (this.MenuItemRendering != null)
         this.MenuItemRendering(this, e);
 }
Exemplo n.º 6
0
 protected virtual void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e)
 {
     if (this.MenuItemRendering != null)
         this.MenuItemRendering.Invoke(this, e);
 }
Exemplo n.º 7
0
        protected virtual bool CheckRender()
        {
            Type myType = this.GetType();
            DynamicMenuItemControlType ctrlType = DynamicMenuItemControlType.Command;
            if (!Enum.TryParse<DynamicMenuItemControlType>(myType.Name, out ctrlType))
                ctrlType = DynamicMenuItemControlType.Command;

            DynamicMenuItemRenderingEventArgs eArgs = new DynamicMenuItemRenderingEventArgs(this._menuItem, ctrlType);
            this.OnMenuItemRendering(eArgs);
            return !eArgs.Cancel;
        }