I have a radrichtextbox with a xaml import raddocument.The document view is correctly in de user control, but i have a problem when i want print. In the windows i set one button to print directly with the next code.
private void DirectPrintRadRibbonButton_Click(object sender, RoutedEventArgs e)
{
Telerik.Windows.Documents.UI.PrintSettings ps = new Telerik.Windows.Documents.UI.PrintSettings();
ps.PrintMode = Telerik.Windows.Documents.UI.PrintMode.Native;
ps.UseDefaultPrinter = false;
ps.ForceVector = true;
ps.PrintScaling = Telerik.Windows.Documents.UI.PrintScaling.None;
this.radRichTextBox.Print(ps);
}
When i print form the RadRichTextBoxRibbonUI
<telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="Native" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PrintCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
<Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/pagesetup.png" Stretch="None"/>
</telerik:RadRibbonButton>
the print result it's fine, but when I use my direct button all my text is shifted to the right and down (Top and left margins i guess).
private void DirectPrintRadRibbonButton_Click(object sender, RoutedEventArgs e)
{
Telerik.Windows.Documents.UI.PrintSettings ps = new Telerik.Windows.Documents.UI.PrintSettings();
ps.PrintMode = Telerik.Windows.Documents.UI.PrintMode.Native;
ps.UseDefaultPrinter = false;
ps.ForceVector = true;
ps.PrintScaling = Telerik.Windows.Documents.UI.PrintScaling.None;
this.radRichTextBox.Print(ps);
}
When i print form the RadRichTextBoxRibbonUI
<telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="Native" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PrintCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
<Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/pagesetup.png" Stretch="None"/>
</telerik:RadRibbonButton>
the print result it's fine, but when I use my direct button all my text is shifted to the right and down (Top and left margins i guess).