Пример #1
0
        public PerformanceReportWindow(filterReportDS data, ReportSettings settings)
        {
            InitializeComponent();

            //hiding the tab headers
            Style s = new Style();
            s.Setters.Add(new Setter(VisibilityProperty, Visibility.Collapsed));
            MainTabCtrl.ItemContainerStyle = s;


            ViewModel = new PerformanceReportViewModel(data, settings, DialogCoordinator.Instance);
            DataContext = ViewModel;

            //give instrument pnl chart 30 pixels height for every bar, there's no better way of fitting it to the contents
            RealizedPLByInstrumentChart.Height = 50 + ViewModel.Data.pnlByInstrument.Rows.Count * 30;
            ROACByInstrumentChart.Height = 50 +  ViewModel.Data.instrumentROAC.Rows.Count * 30;
            TotalPLByTagChart.Height = 50 + ViewModel.Data.PLByTag.Rows.Count * 30;
            AvgPLByTagChart.Height = 50 + ViewModel.Data.PLByTag.Rows.Count * 30;
        }
Пример #2
0
        public PerformanceReportWindow(filterReportDS data, ReportSettings settings)
        {
            InitializeComponent();

            //hiding the tab headers
            Style s = new Style();

            s.Setters.Add(new Setter(VisibilityProperty, Visibility.Collapsed));
            MainTabCtrl.ItemContainerStyle = s;

            ViewModel   = new PerformanceReportViewModel(data, settings, DialogCoordinator.Instance);
            DataContext = ViewModel;

            //give instrument pnl chart 30 pixels height for every bar, there's no better way of fitting it to the contents
            RealizedPLByInstrumentChart.Height = 50 + ViewModel.Data.pnlByInstrument.Rows.Count * 30;
            ROACByInstrumentChart.Height       = 50 + ViewModel.Data.instrumentROAC.Rows.Count * 30;
            TotalPLByTagChart.Height           = 50 + ViewModel.Data.PLByTag.Rows.Count * 30;
            AvgPLByTagChart.Height             = 50 + ViewModel.Data.PLByTag.Rows.Count * 30;
        }