找回密码
 立即注册

QQ登录

只需一步,快速开始

893559686

初级会员

13

主题

40

帖子

345

积分

初级会员

积分
345

微信认证勋章

893559686
初级会员   /  发表于:2016-8-16 13:18  /   查看:2798  /  回复:1

GrapeCity.ActiveReports.Viewer.Wpf.Viewer.ContextMenu  如何添加菜单?

wpf代码:
xmlns:MyViewer="clr-namespace:GrapeCity.ActiveReports.Viewer.Wpf;assembly=GrapeCity.ActiveReports.Viewer.Wpf.v10"
<MyViewer:Viewer Grid.Column="1" x:Name="viewer1" />
.cs代码:
MenuItem _exportButton = new MenuItem();
this._exportButton.Name = "Export";
this._exportButton.Header = "导出";
this._exportButton.IsEnabled = false;
this._exportButton.ToolTip = "导出报表";
this.viewer1.ContextMenu = new ContextMenu();
this.viewer1.ContextMenu.Items.Add(_exportButton);

代码如上,但却添加不上菜单。求助。




1 个回复

倒序浏览
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-8-17 15:49:04
沙发
与上一帖子相同,关闭此贴: http://gcdn.gcpowertools.com.cn/showtopic-24218-1-1.html
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部