RadDatePicker: how can we change the culture on-the-fly?

3 posts, 0 answers
  1. Jane
    Jane avatar
    16 posts
    Member since:
    Jun 2009

    Posted 15 Jan 2010 Link to this post

    From the example code, we see that we can change the culture in Xaml

     

     

     

    <telerikInput:RadDatePicker x:Name="datePicker" HorizontalAlignment="Left" Margin="10" Width="200" Culture="en-US" />
    we can change Culture as any language in the drop down list such as chinese:

     

     

     

    <telerikInput:RadDatePicker x:Name="datePicker" HorizontalAlignment="Left" Margin="10" Width="200" Culture="Chinese (People's Republic of China)" />

     

     

     

    We need to change the culture on-the-fly. Can we do it on the Xaml?
    If not, we have to do it through code-behind.
    How do we get the list of culture list as above string?
    thx!
    Jane

  2. Jane
    Jane avatar
    16 posts
    Member since:
    Jun 2009

    Posted 15 Jan 2010 Link to this post

    It looks like we can use the Culture Name.
    for an example, for German: datePicker.Culture = new CultureInfo("de-DE"); in the code behind.
    Jane

     

  3. UI for WPF is Visual Studio 2017 Ready
  4. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 20 Jan 2010 Link to this post

    Hello Jane,

    Thank you for contacting us.

    This is the right way to set the culture of the DatePicker. You can find list with culture codes here.
    Hope this helps.

    If you have further questions please feel free to contact us again.

    Sincerely yours,
    Konstantina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top