Unplanned
Last Updated: 27 Nov 2025 11:12 by ADMIN
Alex
Created on: 27 Nov 2025 11:11
Category: MaskedEntry
Type: Bug Report
0
MaskedEntry: [iOS] Cannot be focused calling the Focus method
Calling Focus(); does not focus the control. 
1 comment
ADMIN
Didi
Posted on: 27 Nov 2025 11:12

Workaround:

Focus the inner RadEntry control:

<VerticalStackLayout>
		<Button Text="Hide Keyboard" Clicked="Button_Clicked" />
		<telerik:RadNumericMaskedEntry x:Name="numeric" />
	</VerticalStackLayout>

and in code behind:

private void Button_Clicked(object sender, EventArgs e)
	{
		var textInput = ChildOfType<RadEntry>(this.numeric);
		if (textInput != null)
		{
			textInput.Focus();
		}
	}

	internal static T ChildOfType<T>(View visualElement) where T : View
	{
		if (visualElement == null)
		{
			return null;
		}

		foreach (var item in VisualTreeElementExtensions.GetVisualTreeDescendants(visualElement))
		{
			if (item is T targetElement)
			{
				return targetElement;
			}
		}

		return null;
	}

Regards,
Didi
Progress Telerik