RichTextBox: Bullet list with several levels is not viewed correctly in WordPad.
In Word, this works as expected. When the document is imported into RadRichTextBox, this works as well.
There are fragmented join geometries when drawing the joints between line segments that create very sharp angles. The fragments are presented by wrongly drawn long ray that start from the join.
This work this around, you can set the DefaultLineVisualGeometrySelector property of the LineSeries3D.
lineSeries.DefaultLineVisualGeometrySelector = new Telerik.Windows.Controls.ChartView.Geometry3DSelector();Note that his workaround works because it removes the joints between the line segments. This prevents the origin of the problem, but it makes the line more jaggy.
Hello Support,
In the daily and weekly view from the ScheduleVies, the last appointments of daily appointments that span several days are not displayed.
Our customers often have daily appointments that span several days. When they switch to the daily or weekly view, the last day of these appointments is missing. We are now receiving daily complaints that the daily and weekly views are unusable. Please fix this bug as soon as possible. This error did not exist in the old Telerik library, but unfortunately we cannot reinstall the old library.
Thank you for your efforts.
Greetings marco
NullReferenceException thrown on opening the CompletionListWindow when RadSyntaxEditor is hosted in a non-WPF application (usually WinForms) and there are no WPF Application and MainWindow initialized.
This can happen if the RadSyntaxEditor for WPF is hosted in a WinForms application. In this scenario the System.Windows.Application.Current and its MainWindow are not initialized, which is what the IntelliPrompt positioning logic relies on.
Exception details:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
> Telerik.Windows.Controls.SyntaxEditor.dll!Telerik.Windows.Controls.SyntaxEditor.UI.IntelliPromptBase.SetPosition(System.Windows.Point pointInScreen) Line 452 C# Telerik.Windows.Controls.SyntaxEditor.dll!Telerik.Windows.Controls.SyntaxEditor.UI.IntelliPromptBase.SetPosition(System.Windows.Point pointInEditorPresenter, System.Windows.Point pointAboveTheCaret) Line 442 C# Telerik.Windows.Controls.SyntaxEditor.dll!Telerik.Windows.Controls.SyntaxEditor.UI.IntelliPromptBase.SetPositionInView() Line 480 C# Telerik.Windows.Controls.SyntaxEditor.dll!Telerik.Windows.Controls.SyntaxEditor.UI.IntelliPromptBase.InitializeIntellisense() Line 401 C# Telerik.Windows.Controls.SyntaxEditor.dll!Telerik.Windows.Controls.SyntaxEditor.UI.IntelliPromptBase.Show(Telerik.Windows.Controls.SyntaxEditor.UI.CaretPosition caretStartPosition, Telerik.Windows.Controls.SyntaxEditor.UI.CaretPosition caretEndPositions) Line 211 C#
Telerik.Windows.Controls.SyntaxEditor.dll!Telerik.Windows.Controls.SyntaxEditor.UI.IntelliPromptBase.Show() Line 182 C#To work this around, you can initialize a new WPF application and MainWindow and create a hidden HwndSource for the MainWindow. This should happen before showing the WPF content in the WinForms application's code.
public Form1()
{
InitializeComponent();
new System.Windows.Application();
System.Windows.Application.Current.MainWindow = new System.Windows.Window();
var parameters = new HwndSourceParameters("HiddenHost")
{
Width = 1, Height = 1,
WindowStyle = unchecked((int)0x80000000) // WS_POPUP | WS_EX_NOACTIVATE
};
var hwndSource = new HwndSource(parameters);
hwndSource.RootVisual = System.Windows.Application.Current.MainWindow;
// other code here
ElementHost host = new ElementHost { Dock = DockStyle.Fill };
host.Child = wpfControl
this.Controls.Add(host);
}
TypeAccessException occurs in .NET Framework projects when using internal class for the data point models. The error doesn't occur in .NET 8 projects.
dsa
System.TypeAccessException: 'Attempt by method 'DynamicClass.Telerik_DynamicGetter_Argument(System.Object)' to access type 'WpfApp29.ChartPoint' failed.' at Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.PropertyNameDataPointBinding.GetValue(object instance) Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ScatterSeriesDataSource.InitializeBinding(Telerik.Windows.Controls.ChartView.DataPointBindingEntry binding) Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ChartSeriesDataSource.GenerateDataPoint(object dataItem, int index) Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ChartSeriesDataSource.BindCore(System.Collections.IEnumerable source)
Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ChartSeriesDataSource.Bind(System.Collections.IEnumerable itemSource)
Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ChartSeriesDataSource.Rebind(System.Collections.IEnumerable oldSource, System.Collections.IEnumerable newSource, bool shouldUpdateSelectedPoints) Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ChartSeriesDataSource.ItemsSource.set(System.Collections.IEnumerable value) Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ChartSeries.InitDataBinding() Line Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ScatterPointSeries.InitDataBinding() Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.ChartSeries.OnApplyTemplate() Telerik.Windows.Controls.Chart.dll!Telerik.Windows.Controls.ChartView.PointTemplateSeries.OnApplyTemplate()
To work this around, upgrade the target framework of the project to .NET 8. Or use the GenericDataPointBinding class for the binding properties of the series (XValueBinding, YValueBinding, etc.), instead of the default PropertyNameDataPointBinding.
The RichTextBox internal logic that imports .docx documents (DocxFormatProvider) doesn't support elements that don't need direct content, but have both start and end tags. Instead such elements should use self-closing tags.
For example, instead of <w:vertAlign w:val="baseline"></w:vertAlign> it should be <w:vertAlign w:val="baseline"/>
When such element is read during import, issues may occur. Two main known issues here are with the w:vertAlign and Relationship tags.
Using
<w:vertAlign w:val="baseline"></w:vertAlign> instead of
<w:vertAlign w:val="baseline"/> throws NullReferenceException with the following stack trace:
System.NullReferenceException: 'Object reference not set to an instance of an object.' Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.OpenXmlHelper.ConvertStringToBaselineAlignment(string value) Line 168 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.SpanStyleImporter.ReadBaselineAlignment(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Parsing.Style style) Line 243 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.SpanStyleImporter.ReadStyle(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Parsing.Style style) Line 88 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.StyleDefinitionsImporter.ReadSpanStyleProperties(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Parsing.Style style) Line 278 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.StyleDefinitionsImporter.ReadStyle() Line 188 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.StyleDefinitionsImporter.Import() Line 67 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.ReadXmlContentFromPackage(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxPartImporterBase importer) Line 430 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.ReadXmlContentAndRelationsFromPackage(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxPartImporterBase importer) Line 406 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.Import() Line 190 C# Telerik.Windows.Documents.FormatProviders.OpenXml.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider.Import(System.IO.Stream input) Line 147 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.FormatProviders.DocumentFormatProviderBase.Import(byte[] input) Line 90 C#
Using
<Relationship Id="rId00004" Target="styles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"></Relationship> instead of
<Relationship Id="rId00004" Target="styles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"/> throws KeyNotFoundException with the following stack trace:
KeyNotFoundException: The given key was not present in the dictionary.
System.ThrowHelper.ThrowKeyNotFoundException() in ThrowHelper.cs
System.Collections.Generic.Dictionary<TKey, TValue>.this[TKey].get(TKey) in Dictionary.cs
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.PartRelationsImporter.GetRelationByID(string) in PartRelationsImporter.cs
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.GetRelationByID(string) in DocxImporter.cs
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.MainDocumentImporter.BuildSection() in MainDocumentImporter.cs
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.MainDocumentImporter.BuildBody() in MainDocumentImporter.cs
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.MainDocumentImporter.BuildDocument() in MainDocumentImporter.cs
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.MainDocumentImporter.Import() in MainDocumentImporter.cs
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.ReadXmlContentFromPackage(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxPartImporterBase) in DocxImporter.cs
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.ReadXmlContentAndRelationsFromPackage(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxPartImporterBase) in DocxImporter.cs
To work this around, import the document with the WordsProcessing library. If you need to display it in RadRichTextBox, you can export it again using the WordsProcessing library. This will normalize the tags. Then import it again using the RadDocument's DocxFormatProvider.
var dplDocxFormatProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
RadFlowDocument flowDocument = dplDocxFormatProvider.Import(File.ReadAllBytes("../../../test.docx"), null);
var docBytes = dplDocxFormatProvider.Export(flowDocument, null);
File.WriteAllBytes("../../../modified-doc.docx", docBytes);
var rtbDocxFormatProvider= new Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider();
RadDocument document = rtbDocxFormatProvider.Import(File.ReadAllBytes("../../../modified-doc.docx"));
The selection a RadComboBox hosted in RadDataForm gets cleared on commit changes. This happens when the RadComboBox is added in the EditTemplate and its IsEditable is set to True. Committing the edit clears the TextBox of the ComboBox, which clears the selection.
To work this around, subscribe to the EditEnding event of RadDataForm and clear the DataContext of the RadComboBox element.
private void RadDataForm_EditEnding(object sender, Telerik.Windows.Controls.Data.DataForm.EditEndingEventArgs e)
{
var dataForm = (RadDataForm)sender;
var myField = dataForm.ChildrenOfType<DataFormDataField>().FirstOrDefault(df => df.Name == "myField");
if (myField != null)
{
var comboBox = (RadComboBox)myField.Content;
comboBox.DataContext = null;
}
}
Pressing the Enter key when a field editor is focused will scroll the vertical scrollbar to the topmost offset. This is reproducible when the properties are grouped. Also, the RenderMode should be set to Flat.
To work this around, change the RenderMode setting to Hierarchical right before the Enter key logic is executed and then return it back to Flat after some time.
private void RadPropertyGrid_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
var propertyGrid = (RadPropertyGrid)sender;
var currentMode = propertyGrid1.RenderMode;
propertyGrid.RenderMode = RenderMode.Hierarchical;
Dispatcher.BeginInvoke(new Action(() =>
{
propertyGrid.RenderMode = currentMode;
}));
}
A memory leak in RadPdfViewer when the control gets removed from the visual tree.
To work this around, use the reflection API to access the leaking VisualTarget objects and call their Dispose method manually.
var pdfViewer = hostBorder.Child as RadPdfViewer;
if (pdfViewer != null)
{
var canvas = viewer.ChildrenOfType<Canvas>().FirstOrDefault(x => x.GetType().Name.Contains("ContentElementsCanvas"));
var visualTargetsDictionaryField = canvas.GetType().GetField("pageNumberToVisualTarget", BindingFlags.NonPublic | BindingFlags.Instance);
var visualTargetsDictionary = (Dictionary<int, List<VisualTarget>>)visualTargetsDictionaryField.GetValue(canvas);
foreach (KeyValuePair<int, List<VisualTarget>> target in visualTargetsDictionary)
{
for (int i = 0; i < target.Value.Count; i++)
{
VisualTarget item = target.Value[i];
item.RootVisual = null;
item.Dispose();
}
}
}
hostBorder.Child = null;
hostBorder.Child = new RadPdfViewer() { Document = newDocument };
Document exported to DOCX with 2025 Q2 cannot be opened by 2025 Q1 or previous versions.
Workaround: Use document processing to fix the document.
var processing_provider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
var document = processing_provider.Import(File.ReadAllBytes("C:\\Users\\test\\Downloads\\word1.docx"),null);
var bytes_ = processing_provider.Export(document, null);
var rtb_provider = new Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider();
var doc = rtb_provider.Import(bytes_);
radRichTextBox.Document = doc;