An ArgumentOutOfRangeException is thrown when the Separator property is set to a string that contains alpha-numeric/numeric "not required" mask tokens, and the clear button is pressed. The control works with a custom RadMaskedTextInput control to parse different date and time patterns for the start and end dates, which replaces the mask tokens with a placeholder, resulting in the exception when updating the Value property of the RadMaskedTextInput when the value is cleared.
When a new line is placed right after a nbsp, the new line is ignored in the layout. This can be reproduced by importing the following HTML:
First <br/>Second
MF_E_SHUTDOWN error occurs in some cases when the camera MediaFoundation resources get released. This may happen on unloaded or initialized of the RadWebCam control.
Here is one of the exception stacktraces that may be observed:
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception: Stop failed: MF_E_SHUTDOWN
at Telerik.Windows.MediaFoundation.MediaFoundationHelper.ThrowOnHResultError(HResult hr, HResult expected, String message)
at Telerik.Windows.MediaFoundation.BaseMediaFoundationPresenter.StopSession()
at Telerik.Windows.Controls.RadWebCam.<Stop>b__38_0()
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 };
The CustomFilterDialogContent element's OK and Cancel buttons are different in size for the Windows 11 theme.
To work this around, you can subscribe to the Loaded event of the CustomFilterDialogContent element and retrieve the RadButton with x:Name="PART_ButtonCancel" via the ChildrenOfType extension method. On the retrieved button, set the VerticalAlignment property to Center.
The following code snippet showcases this suggestion's implementation:
static MainWindow()
{
EventManager.RegisterClassHandler(typeof(CustomFilterDialogContent), LoadedEvent, new RoutedEventHandler(OnCustomFilterDialogContentLoaded));
}
private static void OnCustomFilterDialogContentLoaded(object sender, RoutedEventArgs e)
{
RadButton cancelButton = ((CustomFilterDialogContent)sender).ChildrenOfType<RadButton>().FirstOrDefault(x => x.Name == "PART_ButtonCancel");
if (cancelButton != null)
{
cancelButton.VerticalAlignment = VerticalAlignment.Center;
}
}
NullReferenceException occurs when the the automation peers creation for the rows goes over 10,000 peers (the MaxCachedPeersSize setting of the GridViewDataControlAutomationPeer). The exception occurs only when the 'record' modifier is used in the class definition. For example:
public record class MyClass(int Id)
{
}
The exception stacktrace is:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
peer was null.
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Automation.Peers.GridViewDataControlAutomationPeer.ClearPeer(Telerik.Windows.Automation.Peers.DataItemAutomationPeer peer) Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Automation.Peers.GridViewDataControlAutomationPeer.GetOrCreateItemPeer(object item, int index) Line 288 C# Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Automation.Peers.GridViewRowAutomationPeer.FindDataItemAutomationPeer(System.Collections.Generic.List<System.Windows.Automation.Peers.AutomationPeer> childPeers) Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Automation.Peers.GridViewRowAutomationPeer.GetChildrenCore()
.
To work this around use the "class" modifier instead of "record". For example, instead of:
public record class MyClass(int Id)
{
}
Use:
public class MyClass
{
public int Id { get; set; }
}
Or alternatively, increase the MaxCachedPeersSize value.
// ***********************************************************************
// some other content here
// some other content here
// ***********************************************************************
public class TestClass
{
}
Check how the performance can be improved in this scenario. The StyleGallery is taking much time to load, the GetUsedCellRange method is called multiple times.
Currently, the DataFormatString property of the columns is applied only to the top-level rows and not to the child ones.
To work this around, create a new DataTemplate for the CellTemplate property of the column and set the StringFormat property of the Binding instance for the element that will be used to display the cell's value in view mode.
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding MyPropertyValue, StringFormat=N2}"/>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
Type in Japanese text in RichTextBox that word wraps beyond the first line and export it to PDF. The text should always be left aligned (as visually shown when typing) but has an "indent" when exported when the font is Segoe UI.
When adding a button cell as below, if the button cell is selected the button doesn't work when tapping it.
<telerik:GridViewDataColumn Header="Config"
DataMemberBinding="{Binding .}" IsReadOnly="True">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<!-- Adding telerik:TouchManager.TouchMode="None" solves the issue -->
<telerik:RadButton HorizontalAlignment="Center" Style="{StaticResource MyButtonStyle}"
Margin="2" Padding="1" Width="Auto" Height="Auto"
Command="{Binding DataContext.ShowExtraConfigurationCommand, RelativeSource={RelativeSource AncestorType=Window}}"
CommandParameter="{Binding .}" ToolTip="Config">
<telerik:RadGlyph Glyph="{StaticResource GlyphGear}"/>
</telerik:RadButton>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
As stated in the comment, adding the property below to the RadButton solves the issue.
telerik:TouchManager.TouchMode="None"
I have attached a sample project in which the error occurs, simply tap a button, close the MessageBox and tap the same button again. Thank you for your time!
The current implementation of the Code128 symbology class used with RadBarcode throws an InvalidSymbolException for characters with codes greater than 127.
As you can see from this table, there are many special characters in Code128 that have larger codes:
https://en.wikipedia.org/wiki/Code_128#Bar_code_widths
It would be useful to have these in applications which need to modify a reader device's behavior with barcode control characters in order to communicate properly.