New to Telerik UI for WPFStart a free 30-day trial

Setting focus to RadChat on load

Updated on Sep 15, 2025

Environment

Product Version2019.1.220
ProductRadChat for WPF

Description

How to set focus to RadChat on load.

Solution

Access the RadWatermarkTextBox inside the RadChat, using the ChildrenOfType extension method and focus it. This can be achieved in the Loaded event of the control.

XAML
	<telerik:RadChat x:Name="chat" Loaded="chat_Loaded" />
C#
	private void chat_Loaded(object sender, RoutedEventArgs e)
    {
        var chat = sender as RadChat;
        var watermarkTextBox = chat.ChildrenOfType<RadWatermarkTextBox>().FirstOrDefault(tb => tb.Name == "PART_InputBox");
        watermarkTextBox.Focus();
    }
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support