//
// Copyright (c) 2015, MindFusion LLC - Bulgaria.
//

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;


namespace MindFusion.Reporting.Wpf.Samples.CS.Barcodes
{
	/// <summary>
	/// Interaction logic for MainWindow.xaml
	/// </summary>
	public partial class MainWindow : Window
	{
		public MainWindow()
		{
			InitializeComponent();

			Report report = Report.FromDictionary(new Uri("ListBoundReport.xaml", UriKind.Relative), "listBoundReport");

			report.Run();

			ReportLayout layout = report.Layout(new Size(8.5 * 96, 11 * 96),
				new Thickness(0.5 * 96), PageOrientation.Portrait);

			FixedDocumentRenderTarget renderTarget = new FixedDocumentRenderTarget();
			layout.RenderAllPages(renderTarget);

			viewer.Document = renderTarget.Document;
		}
	}
}
