protected virtual void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e) { if (this.MenuItemRendering != null) { this.MenuItemRendering.Invoke(this, e); } }
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); }
protected void ctrl_MenuItemRendering(object sender, DynamicMenuItemRenderingEventArgs e) { this.OnMenuItemRendering(e); }
protected void childCtrl_OnRendering(object sender, DynamicMenuItemRenderingEventArgs e) { this.OnMenuItemRendering(e); }
protected void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e) { if (this.MenuItemRendering != null) this.MenuItemRendering(this, e); }
protected virtual void OnMenuItemRendering(DynamicMenuItemRenderingEventArgs e) { if (this.MenuItemRendering != null) this.MenuItemRendering.Invoke(this, e); }
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; }