The CollectionEditor control has a resize functionality which allows you to drag its bottom right cornet, which changes the Width and Height of the root element in the ControlTemplate of the CollectionEditor. When hosted in CollectionEditorPicker, the CollectionEditor is placed in a RadDropDownButton's DropDownContent which is basically a Popup with Placement=Bottom. When the popup goes near the bottom edge of the screen, thus doesn't having enough height to render all its contents, the Popup is automatically re-positioned so it aligns top to its parent element (the RadDropDownButton in this case). In other words, the Popup starts behaving as if its Placement=Top.
This behavior leads to issues with the vertical resizing of the CollectionEditor control. Firstly, when the Popup is automatically aligned using the Top placement, if you resize to a size small enough to fit under the picker control, the Popup gets re-positioned below the picker. Secondly, if you vertically resize the CollectionEditor to a bigger size while aligned to Top, the resizing action will increase the control height, but because of the alignment it will look like the resizing happens from the top corner of the control. In this scenario, also the buttons of the CollectionEditor disappear.
To work this around, you can disable the resizing behavior of the CollectionEditor control.
static MainWindow()
{
EventManager.RegisterClassHandler(typeof(CollectionEditor), CollectionEditor.LoadedEvent, new RoutedEventHandler(CollectionEditor_Loaded));
}
private static void CollectionEditor_Loaded(object sender, RoutedEventArgs e)
{
var collectionEditor = (CollectionEditor)sender;
var popupParent = collectionEditor.ParentOfType<Popup>();
if (popupParent != null && popupParent.PlacementTarget.GetType() == typeof(CollectionEditorPicker))
{
collectionEditor.ResizeGripperVisibility = Visibility.Collapsed;
}
}
The position of the popup representing the IntelliPrompt is wrong when shown on the monitor with the higher DPI scale, in a setup with two monitors with different DPI settings. For example, if one monitor has 100% DPI scale and the other 125%, the position of the popup will be wrong when the app is on the 125% monitor.
To work this around, use the Caret visual as the PlacementTarget for the popup and set its offsets to 0 after it is shown.
private void RadSyntaxEditor_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (KeyboardModifiers.IsControlDown && e.Key == Key.Space)
{
e.Handled = true;
var editor = (RadSyntaxEditor)sender;
CaretPosition startPosition = new CaretPosition(editor.CaretPosition);
CaretPosition endPosition = new CaretPosition(editor.CaretPosition);
editor.IntelliPrompts.CompletionListWindow.Show(startPosition, endPosition);
editor.IntelliPrompts.CompletionListWindow.HorizontalOffset = 0;
editor.IntelliPrompts.CompletionListWindow.VerticalOffset = 0;
}
}
private void RadSyntaxEditor_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
var editor = (RadSyntaxEditor)sender;
var caret = editor.FindChildByType<Telerik.Windows.Controls.SyntaxEditor.UI.Caret>();
editor.IntelliPrompts.CompletionListWindow.PlacementTarget = caret;
editor.IntelliPrompts.CompletionListWindow.Placement = System.Windows.Controls.Primitives.PlacementMode.Bottom;
}
ArgumentException occurs when using the voice typing feature of Windows (started with the Windows Key + H key combo) to convert speech to text in RadRichTextBox.
Exception stacktrace:
System.ArgumentException: 'Requested distance is outside the content of the associated document.'PresentationFramework.dll!System.Windows.Documents.TextPointer.TextPointer(System.Windows.Documents.TextContainer textContainer, int offset, System.Windows.Documents.LogicalDirection direction) PresentationFramework.dll!System.Windows.Documents.TextContainer.CreatePointerAtOffset(int offset, System.Windows.Documents.LogicalDirection direction) PresentationFramework.dll!System.Windows.Documents.TextParentUndoUnit.Do() PresentationFramework.dll!MS.Internal.Documents.UndoManager.Redo(int count) PresentationFramework.dll!System.Windows.Documents.TextStore.RedoQuietly(int count) PresentationFramework.dll!System.Windows.Documents.TextStore.SetFinalDocumentState(MS.Internal.Documents.UndoManager undoManager, System.Collections.Stack imeChangeStack, int appChangeCount, int imeSelectionAnchorOffset, int imeSelectionMovingOffset, int appSelectionAnchorOffset, int appSelectionMovingOffset) PresentationFramework.dll!System.Windows.Documents.TextStore.HandleCompositionEvents(int previousUndoCount) PresentationFramework.dll!System.Windows.Documents.TextStore.GrantLockWorker(MS.Win32.UnsafeNativeMethods.LockFlags flags) PresentationFramework.dll!System.Windows.Documents.TextStore.RequestLock(MS.Win32.UnsafeNativeMethods.LockFlags flags, out int hrSession)
dialog.Filter = "Special files|.*_FileNamePart.txt"Pasting an invalid range of dates in the RadDateRangePicker, for example, "ABC", raises an exception.
To work around this behavior, you could subscribe to the Loaded event of RadDateRangePicker and retrieve the DateRangeMaskedInput element via the visual tree helper methods. Then, subscribe to its ValueChanging event and check whether the NewValue property of the event arguments contains any letters or characters that are not valid. If it does, set the Handled property to True.
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.dateRangePicker.Loaded += DateRangePicker_Loaded;
}
private void DateRangePicker_Loaded(object sender, RoutedEventArgs e)
{
DateRangeMaskedInput dateRangeMaskedInput = this.dateRangePicker.FindChildByType<DateRangeMaskedInput>();
if (dateRangeMaskedInput != null)
{
dateRangeMaskedInput.ValueChanging += DateRangeMaskedInput_ValueChanging;
}
}
private void DateRangeMaskedInput_ValueChanging(object? sender, Telerik.Windows.Controls.MaskedInput.RadMaskedInputValueChangingEventArgs e)
{
if (e.NewValue.ToString().Any(char.IsLetter))
{
e.Handled = true;
}
}
}
When developing live (localization/resource) display language switching for SL5, the LocalizationManager should allow to update all localization strings applied through the ResourceManager. In SL5 it's not possible to listen to an attached dependency property for all dependency objects. Therefore it would help to have a way to know when the attached ResourceKey dependency property changes (and on which DependencyObject) in the LocalizationManager.
Currently, the only customization that can be performed is using HyperlinkToolTipFormatString property of RadRichTextBox, which sets the format for all hyperlinks in the document of the control. It would be nice if it were possible to be able to set different tooltips.
Font weight, size and other current editing style properties are not preserved when document layout is performed, for example in the following cases: - the document is in web layout mode and the controls is resized - scroll bar changes its visibility. Steps to reproduce: - Set RadRichTextBox to Web layout mode. - Type a word, select it and make it bold. - Press enter and type a word - Repeat the previous step until RadRichTextBox height is reached and scrollbar appear. - Type a word. Expected: The last word is bold. Actual: The last word is not bold.
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.
The PDF document with images shows black canvas:
NOTE:
Works OK in version 2023.2.713Introduce events similar to the PageRenderStarted and PageRenderCompleted ones that the Telerik UI for WinForms RadPdfViewer provides:
WinForms PdfViewer How-To Handle Rendering Events - Telerik UI for WinForms