New to Telerik UI for WinUI? Download free 30-day trial

Culture Service

The CultureService class allows to localize the culture-aware settings of the RadNumericBox on a per control basis. It is placed in the Telerik.UI.Xaml.Controls.Primitives namespace.

Properties

The following attached properties are exposed:

  • Culture
  • CultureName

Here are the available methods:

  • GetCultureName(DependencyObject instance): Gets the CultureName value for the specified dependency object instance.
  • SetCultureName(DependencyObject instance, string cultureName): Sets the specified CultureName value to the provided dependency object instance.
  • GetCulture(DependencyObject instance): Gets the CultureInfo value for the specified dependency object instance.
  • SetCulture(DependencyObject instance, CultureInfo value): Sets the specified CultureInfo value to the provided dependency object instance.

Examples 1 and 2 demonstrate how to change the culture of a single RadNumericBox to "de".

Example 1: Setting the CultureName in xaml

<Grid xmlns:input="using:Telerik.UI.Xaml.Controls.Input"> 
    <input:RadNumericBox telerikPrimitives:CultureService.CultureName="de" /> 
</Grid> 

Example 2: Setting the CultureName in code

RadNumericBox currentNumBox = new RadNumericBox(); 
currentNumBox.SetValue(CultureService.CultureProperty, new CultureInfo("de")); 

See Also

In this article
Not finding the help you need?