I want to print in the center of paper like Windows Paint.exe
Is there an property for Centering in ReportSettings?
Hi,
I'm researching this for you and will post back here when I have more information.
You can create a DataTemplate object in XAML
<Window.Resources>
<DataTemplate x:Key="basicContentTemplate">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<ContentPresenter Content="{TemplateBinding Content}" />
</Grid>
</DataTemplate>
</Window.Resources>
And then set the report’s PageContentTemplate to the DataTemplate.
report1.PageContentTemplate = this.TryFindResource("basicContentTemplate") as DataTemplate;
report1.PageContentTemplate =
this.TryFindResource(
"basicContentTemplate")
as DataTemplate;
The EmbeddedVisualReportSection also exposed a PageContentTemplate if you only needed to affect a specific section of your report.
Let me know if you have any questions.