The numeric box that allows you to select the "to" page in the PrintPreviewControl is clipped when the "Pages:" and "to" strings are translated to a language where these words are longer. For example, this reproduces with Dutch culture which uses the "Pagina's:" and "naar" texts.
To work this around, you can get the Grid panel that hosts the content and increase the Width of one of its ColumnDefinitions.
private void PrintPreviewControl_Loaded(object sender, RoutedEventArgs e)
{
var printPreview = (PrintPreviewControl)sender;
var rootGrid = printPreview.FindChildByType<Grid>();
rootGrid.ColumnDefinitions[0].Width = new GridLength(355);
}
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
A XamlParseException is raised when the theme's resource dictionaries are not merged in App.xaml. The missing resource is the RepeatButtonStyle resource.
To work this around, merge the resource dictionaries for the theme in the Resources collection of the App.xaml file.
Currently, the RadExpressionEditor control shows a wavy underline and a red color to indicate that an error is present.
We could introduce API to modify this behavior, which will ultimately be used by the ChangeUnderlineDecoration and ChangeUnderlinesColor methods of the internal RadRichTextBox control.
One of the following two exceptions occur when the BindingOperations.EnableCollectionSynchronization() is used with the ItemsSource of RadTreeListView:
When using the EnableCollectionSynchronization, the corresponding items control should allow updates of the ItemsSource collection on different threads. This is valid if the requirements to use the EnableCollectionSynchronization method are met.
The exception stack traces are:
InvalidOperationException
at System.ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion() in /_/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs:line 432
at System.Collections.Generic.List`1.Enumerator.MoveNext() in /_/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs:line 1130
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at Telerik.Windows.Data.EnumerableExtensions.<SelectRecursive>d__15`1.MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at Telerik.Windows.Data.HierarchicalCollectionViewBase.PopulateInternalList(IQueryable view)
at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
at Telerik.Windows.Data.HierarchicalCollectionViewBase.get_InternalCount()
at Telerik.Windows.Data.DataItemCollection.get_Item(Int32 index)
at Telerik.Windows.Controls.GridView.Rows.GetRowItemsAtRange(Int32 startIndex, Int32 endIndex)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.RealizeRows(Int32 startIndex, Int32 endIndex, Double& verticalOffset, HashSet`1& realizedRows)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.MeasureOverride(Size availableSize)
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size availableSize)
NullReferenceException at Telerik.Windows.Data.QueryableCollectionView.InternalGetItemAt(Int32 index) in Telerik.Windows.Data\QueryableCollectionView.cs:line 3081 at Telerik.Windows.Controls.GridView.Rows.GetRowItemsAtRange(Int32 startIndex, Int32 endIndex) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.RealizeRows(Int32 startIndex, Int32 endIndex, Double& verticalOffset, HashSet`1& realizedRows) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.MeasureOverride(Size availableSize) at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size availableSize)
To work this around dispatch the updates of the ItemsSource collection to the main UI thread.
Dispatcher.BeginInvoke(new Action(() =>
{
// add/remove items from the source collection
}));
The attached image shows the issue.
This is a regressiion issue in the 2024.3.924 release of Telerik UI for WPF.
Save and load of the saved XML should result of the same item IDs for every RadDiagramItem (shapes, connections).
To work this around, you can create a custom SerializationService and override its DeserializeItems method, where you can change the "makeUnique" parameter.
The issue manifests also when doing drag/drop from the RadDiagramToolBox or any other custom drag drop implementation that uses the DiagramDropInfo class (which is automatically handled by the RadDiagram's drop internal code). In this case the custom service approach won't work because the drag/drop deserialization works with a separate instance of SerializationService (SerializationService.Default) which cannot be changed. In this case, you can subscribe RadDiagram to the DragDropManaged.Drop event and manually call the SerializationService.Default.DeserializeItems method.
public class CustomSerializationService : SerializationService
{
public CustomSerializationService(IGraphInternal graph) : base(graph)
{
}
public override IEnumerable<IDiagramItem> DeserializeItems(SerializationInfo serializationInfo, bool makeUnique = false)
{
makeUnique = false;
return base.DeserializeItems(serializationInfo, makeUnique);
}
}
public MainWindow()
{
InitializeComponent();
this.diagram.ServiceLocator.Register<ISerializationService>(new CustomSerializationService(this.diagram));
DragDropManager.AddDropHandler(this.diagram, OnDiagramDrop);
}
private void OnDiagramDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
var data = DragDropPayloadManager.GetDataFromObject(e.Data, typeof(DiagramDropInfo).Name);
if (data is DiagramDropInfo)
{
SerializationService.Default.DeserializeItems(((DiagramDropInfo)data).Info, false);
}
}