or
DocumentPosition caretPos = null;DocumentPosition endOfDocument = null;var rtfText = myRtfText;if (rtfText != null){ var provider = new RtfFormatProvider(); var radDocument = provider.Import(rtfText); radDocument.SectionDefaultPageSize = new Size(maximumSize.Width, maximumSize.Height); var radRichTextBox = new RadRichTextBox{Document = radDocument}; DocumentPosition tempPos = radRichTextBox.Document.CaretPosition; tempPos.MoveToLastPositionInDocument(); endOfDocument = new DocumentPosition(tempPos); caretPos = radRichTextBox.Document.CaretPosition; caretPos.MoveToFirstPositionInDocument(); if(caretPos != endOfDocument) { var start = new DocumentPosition(radRichTextBox.Document.CaretPosition); while (caretPos.Location.Y - start.Location.Y < maximumSize.Height) { if (!radRichTextBox.Document.CaretPosition.MoveToCurrentLineEnd()) break; if (!radRichTextBox.Document.CaretPosition.MoveNext()) break; } if (caretPos.Location.Y - start.Location.Y > maximumSize.Height) { // Back up so the content fits within the range radRichTextBox.Document.CaretPosition.MoveToLastPositionInPreviousParagraph(); } var docSelection = new DocumentSelection(radRichTextBox.Document); docSelection.SetSelectionStart(start); docSelection.AddSelectionEnd(caretPos); var docFragment = new DocumentFragment(docSelection); var newDoc = new RadDocument(); var editor = new RadDocumentEditor(newDoc); editor.InsertFragment(docFragment); var rtfSegment = provider.Export(newDoc); } }
<Style x:Key="gridheaderstyle" TargetType="telerik:GridViewHeaderRow"> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0 0 0 0" /> <Setter Property="Background" Value="Transparent" /></Style><Style x:Key="gridheadercellstyle" TargetType="telerik:GridViewHeaderCell"> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Black" /> <Setter Property="BorderThickness" Value="0 0 1 1" /></Style>Hi
all,
I think i'm missing something obvious...
I want to have some friendly names on my mail merge fields. (namely
spaces in the field names)
So i have a class for instance
Public Class someclass{<DisplayName("This is the complex description of the field")>Public property thisfieldnamehasacomplexdescription as string Public property anothercomplexfield as string }
This is the only way i know to get "Friendly" names in the dropdown
that is the mail merge.
So the two fields turn up okay as :
"This is the complex description of
the field"
"anothercomplexfield"
but only anothercomplexfield actually populates with data when you do the merge.
Am i going to have to template the raddropdownbutton that holds the mail merge
fields?
Is there an example of this somewhere?
Also a sub question. How do i add a scroll bar??