mirror of
https://github.com/DevExpress/netcore-winforms-demos.git
synced 2025-12-26 03:17:34 +00:00
35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
using System;
|
|
using DevExpress.DevAV.ViewModels;
|
|
using DevExpress.XtraReports.UI;
|
|
using DevExpress.Mvvm;
|
|
|
|
namespace DevExpress.DevAV.Modules {
|
|
public partial class OrderRevenueView : BaseModuleControl, IRibbonModule {
|
|
public OrderRevenueView() : base(typeof(OrderRevenueViewModel)) {
|
|
InitializeComponent();
|
|
}
|
|
public OrderRevenueViewModel ViewModel {
|
|
get { return GetViewModel<OrderRevenueViewModel>(); }
|
|
}
|
|
protected override void OnLoad(EventArgs e) {
|
|
base.OnLoad(e);
|
|
documentViewer1.DocumentSource = ViewModel.Report;
|
|
}
|
|
#region
|
|
XtraBars.Ribbon.RibbonControl IRibbonModule.Ribbon {
|
|
get {
|
|
if(string.IsNullOrEmpty(ribbonControl.ApplicationDocumentCaption))
|
|
ribbonControl.ApplicationDocumentCaption = (string)(ViewModel as IDocumentContent).Title;
|
|
return ribbonControl;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
private void showDesignerBarItem_ItemClick(object sender, XtraBars.ItemClickEventArgs e) {
|
|
//using(var tool = new ReportDesignTool(ViewModel.Report)) {
|
|
// tool.ShowRibbonDesignerDialog();
|
|
//}
|
|
}
|
|
}
|
|
}
|