The custom list styles from a document exported by RadRichTextBox's HtmlFormatProvider are not imported.
When trying to show the RadRichTextBox' LineNumberingDialog, nothing is displayed. This happens when using the NoXaml Telerik dlls and themes other than Windows11. The dialog is shown only in the Windows11 theme.
To work this around, add the following two lines in the App.xaml resources.
<Application x:Class="WpfApp1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApp1"
xmlns:telerikDialogs="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI.Dialogs;assembly=Telerik.Windows.Controls.RichTextBox"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/System.Windows.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.ImageEditor.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Fluent;component/Themes/Telerik.Windows.Controls.RichTextBox.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="telerikDialogs:LineNumberingDialog" BasedOn="{StaticResource RadWindowStyle}"/>
<Style TargetType="telerikDialogs:LineNumberingDistanceNumericUpDown" BasedOn="{StaticResource RadNumericUpDownStyle}"/>
</ResourceDictionary>
</Application.Resources>
</Application>
The center text alignment is lost when the last paragraph is copied and pasted.
Steps to reproduce:
- Enter some text and center it.
- Copy and paste it into another document.
Actual: the aligmennt is lost
Expected: the alignment should be preserved
To reproduce set he following properties:
MouseSelectionHandler.DoubleClickTime = 1000;
MouseSelectionHandler.MouseDragThreshold = 2;
MouseSelectionHandler.MouseDoubleClickThreshold = 60;
Profiling results show bottleneck in the line-breaking logic within Paragraph MeasureOverride.
Using the SpreadStreamExport feature of RadGridView doesn't work as expected when exporting DateTime objects. It exports the dates as String values which prevents the date-related features (like formatting) to work in Excel.
To work this around, you can create a custom SpreadStreamExportRenderer and override its SetCellValue method. This will allow you to manually provide the DateTime object instead of the string.
public class MyRenderer : SpreadStreamExportRenderer
{
public override void SetCellValue(DataType dataType, object value)
{
DateTime date;
if (value != null && DateTime.TryParse(value.ToString(), out date))
{
base.SetCellValue(DataType.DateTime, date);
var cell = this.GetCell() as ICellExporter;
cell.SetFormat(new SpreadCellFormat() { NumberFormat = "yyyy-MM-dd HH:mm:ss" });
return;
}
base.SetCellValue(dataType, value);
}
}
spreadStreamExport.RunExportAsync(FILENAME, new MyRenderer(), options);
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);
}