This question is locked. New answers and comments are not allowed.
I am binding a RadRichTextbox though your HTMLDataProvider to a viewmodel. If you look at the attached image you will see the control is displaying a large margin around the text. the only way i could figure out how to change that margin is via the SetupDocument event on HtmlDataProvider as shown below in the codehind. I would prefer to not have any codebehind, so is there a way to change that margin on the xaml side. it seems as though every time it binds a change, the page margin goes back to some default. if that is true it seems like i should be able to change the default margin but i havent been able to figure it out. is it possible?
CodeBehind:
XAML:
<documents:RadRichTextBox x:Name="EulaRichTextBox" Grid.Row="1" Grid.ColumnSpan="2" IsReadOnly="True" >
<documents:RadRichTextBox.Resources>
<documentsHtml:HtmlDataProvider x:Key="htmlDataProvider" RichTextBox="{Binding ElementName=EulaRichTextBox}" Html="{Binding EndUserAgreementVerbiage, Mode=TwoWay}" SetupDocument="HtmlDataProvider_SetupDocument" />
</documents:RadRichTextBox.Resources>
</documents:RadRichTextBox>
CodeBehind:
private void HtmlDataProvider_SetupDocument(object sender, Telerik.Windows.Documents.FormatProviders.SetupDocumentEventArgs e)
{
e.Document.SectionDefaultPageMargin =
new Telerik.Windows.Documents.Layout.Padding(10, 10, 10, 10);
}