Telerik UI for Windows 8 XAML

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

Exposed are the following attached properties:

  • Culture

  • CultureName

Below 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.

The following example shows how to change the Culture of a single RadNumericBox to "de":

XAML Copy imageCopy
<telerikInput:RadNumericBox telerikPrimitives:CultureService.CultureName="de"/>
C# Copy imageCopy
RadNumericBox currentNumBox = new RadNumericBox();
currentNumBox.SetValue(CultureService.CultureProperty, new CultureInfo("de"));