using System.Windows;
using InABox.Core;
using InABox.Wpf;
using HorizontalAlignment = System.Windows.HorizontalAlignment;
namespace InABox.Reports
{
///
/// Interaction logic for ReportManager.xaml
///
public partial class ReportManager : ThemableWindow
{
private readonly ReportGrid grid;
public ReportManager()
{
InitializeComponent();
grid = new ReportGrid
{
HorizontalAlignment = HorizontalAlignment.Stretch,
VerticalAlignment = VerticalAlignment.Stretch,
Margin = new Thickness(5)
};
AddChild(grid);
}
public string Section { get; set; }
public Dictionary DataEnvironment { get; set; }
public DataModel? DataModel { get; set; } = null;
public bool Populate { get; set; } = false;
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Title = "Reports - " + DataModel.Name;
grid.DataModel = DataModel;
grid.Section = Section;
grid.Populate = Populate;
//grid.DataEnvironment = DataEnvironment;
grid.Refresh(true, true);
}
}
}