Won't Fix
Last Updated: 08 Jan 2026 17:07 by ADMIN

RadHighlightTextBlock — Text binding stops updating when HighlightText is used

.Net framework 4.7.2
Telerik WPF Version 2025.1.211.462

Detailed Information

When developing an application using Telerik's RadHighlightTextBlock control, I encountered the following issues:

When attempting to dynamically update the control's `Text` and `HighlightText` properties through data binding, the control fails to display the updated content correctly. Specifically:

  1. After updating property values in the ViewModel, RadHighlightTextBlock doesn't display the new text content
  2. Even if the text updates, the highlighted portion doesn't correctly reflect the new HighlightText value
  3. The control's UI display is inconsistent with the actual values in the data model

I have confirmed that:

  • Data binding paths are correct
  • ViewModel implements INotifyPropertyChanged
  • Other controls bound to the same data source update correctly

I suspect this might be an issue with RadHighlightTextBlock's internal update handling mechanism, or it may require specific settings to properly handle dynamic update scenarios.

My Code:

MainWindow.xaml

<Window x:Class="RadHighlightTextBlock_Issue.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:RadHighlightTextBlock_Issue"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Window.Resources>
        <local:MyViewModel x:Key="MyViewModel"/>
    </Window.Resources>
    <StackPanel>
        <telerik:RadHighlightTextBlock x:Name="highlightTextBlock" 
                                       Text="{Binding Source={StaticResource MyViewModel}, Path=SelectedItem.Description}"
                                      HighlightText="{Binding Source={StaticResource MyViewModel}, Path=SelectedItem.HighlightText}"
                                      HighlightForeground="Red"
                                      HighlightBackground="Yellow"
                                      FontSize="16"
                                      Margin="10"/>
        <telerik:RadButton Content="Content0" Command="{Binding Source={StaticResource MyViewModel}, Path=C0Command}"/>
        <telerik:RadButton Content="Content1" Command="{Binding Source={StaticResource MyViewModel}, Path=C1Command}"/>
    </StackPanel>
</Window>

MainWindow.xaml.cs

using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Input;

namespace RadHighlightTextBlock_Issue
{
    /// <summary>
    /// MainWindow.xaml 的互動邏輯
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void RadButton_Click(object sender, RoutedEventArgs e)
        {
            highlightTextBlock.Text = "This is a sample text to demonstrate the RadHighlightTextBlock control.";
        }

        private void RadButton_Click_1(object sender, RoutedEventArgs e)
        {
            highlightTextBlock.Text = "This is another sample text for the second button.";
        }
    }

    public class MyViewModel : INotifyPropertyChanged
    {
        public ObservableCollection<DataItem> Items { get; set; }
        public MyViewModel()
        {
            Items = new ObservableCollection<DataItem>
            {
                new DataItem { HighlightText = "sample", Description = "This is a sample description." },
                new DataItem { HighlightText = "second", Description = "This is the second item description." },
                new DataItem { HighlightText = "text", Description = "This item contains the word text." }
            };

            SelectedItem = Items.FirstOrDefault();
        }

        public ICommand C0Command => new RelayCommand<object>((obj) =>
        {
            SelectedItem = Items.FirstOrDefault();
        });

        public ICommand C1Command => new RelayCommand<object>((obj) =>
        {
            SelectedItem = Items.LastOrDefault();
        });

        private DataItem _selectedItem;
        public DataItem SelectedItem
        {
            get { return _selectedItem; }
            set
            {
                if (_selectedItem != value)
                {
                    _selectedItem = value;
                    OnPropertyChanged();
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = "")
        {
            var handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }

    public class DataItem
    {
        public string HighlightText { get; set; }
        public string Description { get; set; }
    }

    /*Implement RelayCommand...*/
}

Has anyone encountered a similar issue? Is there any way to resolve it?
Thank you all.

Won't Fix
Last Updated: 25 Jul 2024 13:09 by ADMIN

Issues when using IsGroupHeadersVirtualizationEnabled=true in timeline mode with different-sized resources:

- Drag&Drop of appointments ends up in the wrong place. The drop preview is also displayed incorrectly on the wrong "resource".
- Placement of appointments when scrolling vertically. Landing visually in other "resources".
- The marking of the slots/cells under the mouse are shifted/wrong and thus also the selection of areas/slots.
Won't Fix
Last Updated: 03 Jul 2024 10:22 by ADMIN
InvalidOperationException with a grouped grid in Windows11 theme (Animation Invalid DefaultValue). 
Won't Fix
Last Updated: 14 Jun 2024 10:06 by ADMIN
Creating a DocumentFragment from a document with hyperlinks removes the links. Consider exposing the Add method of DocumentFragment as well. 
Won't Fix
Last Updated: 21 May 2024 10:47 by ADMIN

The UI is not updated when an item is replaced in the bound ListCollectionView. 

Workaround: Remove the item and add a new one.

Won't Fix
Last Updated: 20 May 2024 09:33 by ADMIN
When in the RadGridView details template on a touch device subsequent clicks are not registered.
Won't Fix
Last Updated: 04 Apr 2024 12:23 by ADMIN
Multiple operations applied on a big RadBitmap can cause OutOfMemoryException because of used and not disposed unmanaged resources in a WriteableBitmap object.

Steps to reproduce:
- Execute multiple times the Rotate tool
Observe: The memory goes up and retains such.
Expected: The unmanaged memory is cleared.

Findings: the memory leak is related to the WPF class WriteableBitmap which is internally used by the RadBitmap. Attached is a sample project illustrating the problem using only WPF classes.
Note: At this point, we are not aware of a possible fix.
Won't Fix
Last Updated: 06 Mar 2024 17:02 by ADMIN

Depending on the chosen theme, the page TextBox will not display all of the digits. This is inconvenient in scenarios where the RadDataPager has many pages.

To work this around, subscribe to the Loaded event of RadDataPager and retrieve the ScrollContentPresenter element with x:Name="PART_ScrollContentPresenter" using the ChildrenOfType extension method and set its Width property to the desired value and HorizontalAlignment property to Center.

private void radDataPager_Loaded(object sender, RoutedEventArgs e)
{
    RadDataPager radDataPager = (RadDataPager)sender;

    ScrollContentPresenter scrollContentPresenter = radDataPager
        .ChildrenOfType<ScrollContentPresenter>().FirstOrDefault(x => x.Name == "PART_ScrollContentPresenter");

    if (scrollContentPresenter != null )
    {
        scrollContentPresenter.Width = 45;
        scrollContentPresenter.HorizontalAlignment = HorizontalAlignment.Center;
    }
}

Won't Fix
Last Updated: 01 Mar 2024 15:09 by Petar
System.Data.Services.Client.DataServiceQueryException
  HResult=0x80131509
  Message=An error occurred while processing this request.
  Source=Microsoft.Data.Services.Client
  StackTrace:
   at System.Data.Services.Client.QueryResult.EndExecuteQuery[TElement](Object source, String method, IAsyncResult asyncResult)
   at System.Data.Services.Client.DataServiceRequest.EndExecute[TElement](Object source, DataServiceContext context, String method, IAsyncResult asyncResult)
   at System.Data.Services.Client.DataServiceQuery`1.EndExecute(IAsyncResult asyncResult)
   at SalesDashboard.MainRepository.<>c__DisplayClass22_1.<GetDailyActualsVsTargetsByProduct>b__1() in C:\temp\SalesDashboard_WPF_Dev_2023_3_1114_SourceCode\SalesDashboard\ViewModel\MainRepository.cs:line 126
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Won't Fix
Last Updated: 15 Feb 2024 15:59 by Petar
The keyboard layout is not correct when using the Polish culture.
Won't Fix
Last Updated: 26 Jan 2024 17:12 by ADMIN
Created by: Matthew
Comments: 1
Category: TimeBar
Type: Bug Report
0
Custom Interval disappears when zooming out. This is caused when the view is updated and there is more than one custom interval.
Won't Fix
Last Updated: 18 Jan 2024 12:40 by Petar
Created by: Stenly
Comments: 3
Category: Map
Type: Bug Report
0
The RadMap control does not display the MBTiles file format.
Won't Fix
Last Updated: 11 Dec 2023 13:02 by ADMIN
As a <role> I want <ability> so that <benefit>.
Won't Fix
Last Updated: 14 Nov 2023 15:58 by ADMIN

Reset by Clear, RemoveRange causes a memory leak of GridViewRow instances (or TreeListViewRow in RadTreeListView).

To work this around, you can call the Clear method of the RadGridView's Items collection and then reset the ItemsSource property.

this.radGridView.Items.Clear();
this.radGridView.ItemsSource = null;
this.radGridView.ItemsSource = newSource;
Edit: The number of instances of the GridViewRow class are relative to the number of containers which cover the visible viewport. They are kep by internal caching mechanism used for faster reuse of containers is data-reload scenarios. Containers are dettached from their previous viewmodels (DataContext).

In non virtualized scenario, the number of the live containers is the same as the number of items in the GridView's ItemsSource and when changing the source, the number remains the same as the items in the source.

We are closing this issue as we think the mentioned internal cache shouldn't be considered a memory problem but rather a powerful performance optimization internal tool for extensive data-refresh scenarios.
Won't Fix
Last Updated: 24 Oct 2023 10:10 by Petar
Associated AutomationProperties.Name is read twice by JAWS.
Won't Fix
Last Updated: 08 Aug 2023 15:02 by ADMIN
When the collection bound to the AppointmentsSource property is cleared and filled with data again, the tooltip of one of the appointments could become visible and it will be displayed on top of all applications.
Won't Fix
Last Updated: 31 Jul 2023 13:51 by ADMIN
Highlighted text's color is set to gray when saving and reopening the file.
Won't Fix
Last Updated: 04 Jul 2023 09:36 by ADMIN

The ZIndex property change is not detected by the VisualizationLayer at runtime. 

Workaround: remove and then add back the item where the ZIndex is changed.

Won't Fix
Last Updated: 21 Apr 2023 13:54 by ADMIN
A binding error appears in the VS Output pane on startup of the RadOpenFileDialog. The error states the following:
System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type RadBreadcrumbBarItem
The error can be ignored because it doesn't break the file dialog functionalities.
Won't Fix
Last Updated: 19 Jan 2023 14:25 by ADMIN
The mouse-over highlight color is not applied to the correct row when the rows are navigated via the keyboard arrows.
1 2 3 4 5 6