The TableCellProperty.Padding property of the "TableNormal" StyleDefinition doesn't take effect in the UI. The same is valid for the TableProperties.CellPadding property.
To work this around, you can manually set the Padding property of all TableCell elements in the RadDocument.
var cells = radDocument.EnumerateChildrenOfType<Telerik.Windows.Documents.Model.TableCell>();
foreach (var cell in cells)
{
cell.Padding = new Padding(10);
}
Using the microsoft word,In docx document,inserting a shape,and add the text context to the shape,then save.
when radrichtextbox open the file,the program crashed.
I have no idea how to reproduce this, but every so often after a paste operation into a RadRichTextBox, the host thread becomes unresponsive to user input. The message pump is still running but the following unhandled exception gets thrown in a tight infinite loop. The only way to close the window is to right click on the taskbar button.
System.NullReferenceException
Message: Object reference not set to an instance of an object.
Call Stack:
at Telerik.Windows.Documents.Layout.LayoutElement.SetParent(LayoutElement newParent)
at Telerik.Windows.Documents.Layout.LayoutBox.EnsureParent()
at Telerik.Windows.Documents.Layout.LayoutBox.get_Parent()
at Telerik.Windows.Documents.Layout.FormattingSymbolLayoutBox.get_IsEndOfCell()
at Telerik.Windows.Documents.Layout.FormattingSymbolLayoutBox.GetFormattingSymbolVisual()
at Telerik.Windows.Documents.SpanBoxPositionHandler.get_Location()
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.GetViewPointFromDocumentPosition(DocumentPosition position)
at Telerik.Windows.Controls.RichTextBoxUI.PasteOptionsPopup.CalculateLocation()
at Telerik.Windows.Controls.RichTextBoxUI.PasteOptionsPopup.OnOwnerLayoutUpdated(Object sender, EventArgs e)
at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
In localizing your demo code for a RichTextBox I noticed some size mode-related inconsistencies in icon placements in the various sorts of buttons:
In Size=large, generally the icon appears above the button text. In the split button the icon is centered over and partially obscures the text. Unacceptable!
In Size=medium, generally the icon appears to the left of the text. In the Split button it appears below the text. Either is fine but should be consistent.
Also, when Size=medium and icon beside text, in all buttons I would like to see more spacing between the icon and the text; there seems to be virtually none.
To reproduce:
This works fine when the list is selected with the mouse.
When importing from a .docx the RichTextBox is adding a blank line for each continuous section break. You can see this in the attached file - in the RichTextBox there is an extra line between sections that does not exist in the source word document.
This can be reproduced with the provided .docx. In Word the image floats in the empty space below the text but the RichTextBox has it inline and overlapping text.
Removing the rectangle from around the image in the source document has no affect.
Hi support,
We have a problem when we copy a text from MS word to RitchTextBox.
If the text copied uses an style that the namecontains tilde, then style name on the ritchtextbox is broken with strange characters.
All works well with this strange characters, but if you export to html and then import to ritchtextbox, the style is lost ...
This is a big problem because in spanish, many styles have tildes. When our user copy content from word they have problem with html format export / import.
I Attach a MS Word docx with a style with tildes:
Steps to reproduce it:
1- Open MS Word attached.
2- Copy the content.
3- Open a ritchTextBox Editor
4- Paste the content.
5- Export to html
6- Import the html.
You can see now, that the style are lost, and the name of the style contains strange characters.
Similar issue its happen when open a Word Docx with styles with tildes from ritchTextBox, not include strange characters but the style is lost.
Thanks for you support,
Hi Guys,
Our application works with a document storage and we use RadRichTextBox to allow users edit and view the documents. Unfortunately, many documents cannot be opened due to the following exception we get:
Unable to cast object of type 'Telerik.Windows.Documents.Model.FieldRangeStart' to type 'Telerik.Windows.Documents.Model.AnnotationRangeEnd
As result we receive complains from our users. Could you please facilitate with solving it?
I have attached a simple test application with the problematic document as well the stacktrace.
Best regards,
Yaroslav
Hi Telerik,
We are converting XAML content into PDF file with below code.
private byte[] Xaml2Pdf(string xamlContent)
{
try
{
XamlFormatProvider xamlFormatProvider = new XamlFormatProvider();
PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
PdfExportSettings exportSettings = new PdfExportSettings();
exportSettings.ContentsCompressionMode = PdfContentsCompressionMode.Automatic;
exportSettings.ContentsDeflaterCompressionLevel = 9;
exportSettings.DocumentInfo = new PdfDocumentInfo() { Producer = "ALIS", Author = "ALIS", Creator = "ALIS" };
exportSettings.ImagesCompressionMode = PdfImagesCompressionMode.Automatic;
exportSettings.ImagesDeflaterCompressionLevel = 9;
pdfFormatProvider.ExportSettings = exportSettings;
byte[] content = pdfFormatProvider.Export(xamlFormatProvider.Import(xamlContent));
return content;
}
catch
{
throw;
}
}
Adding bookmarks with the same name programmatically always returns the first one in case use attempts to navigate to it using the Bookmarks dialog.
Workaround: Remove the bookmark before adding a new one with the very same name.
With a picture of original size like this : width 2 800 and Height 1376. On the screen the picture is around 470 by 230. If I go to the Image Editor, it shows me the picture size itself but not the area size used by the picture. It is a good thing to have the original picture's dimension but we work with the dimension used in the document. So, could you do something to resize the picture used in the document.
In my samples, you'll see my picture in a document (ie1), what I see when I go in the Image Editor (ie2) and, when I go to the Resize section (ie3). Suggestion, put the original image's dimension on the top of the right corner in the resize section. The width and Height should show the dimension in the document.
Thanks a lot,
Open a docx file in richtextbox, if numpages in headers do any subtraction, it can not display correctly. see the attached pictures for how to display in richtextbox and microsoft word 2016.
Annotation Ranges where SkipPositionBefore is set to false on the AnnotationRangeEnd cause cursor jumps when deleting content to the right of the Annotation Range. Steps to reproduce: 1. Open a job with Annotation Ranges where SkipPositionBefore is set to false on the AnnotationRangeEnd (I used the Document Protection sample in the demo app) 2. Move your cursor to the end of the range. 3. Hit the delete key Expected: The cursor remains at the end of the AnnotationRange and content to the right is deleted. Actual: Content to the right is deleted but eventually the cursor will jump to the right by one position and end up outside the Annotation Range.
When cross-reference is added in the header/footer of a document in does not show the available options from the document. XAML team reviewed this item and noted that it duplicates with another one. Please use the item below in order to track the status of this request. https://feedback.telerik.com/Project/143/Feedback/Details/210419-richtextbox-add-functionality-to-work-with-cross-references-and-hyperlinks-to-bo