Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4598942
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:28:14+00:00 2026-05-21T23:28:14+00:00

In my case: I have a TextBlock Binding to a property of type DateTime.

  • 0

In my case:

I have a TextBlock Binding to a property of type DateTime.
I want it to be displayed as the Regional settings of the User says.

<TextBlock Text="{Binding Date, StringFormat={}{0:d}}" />

I am setting Language property as WPF XAML Bindings and CurrentCulture Display
says:

this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);

But with this line of code it just displays the text as the default format of CultureInfo
with IetfLanguageTag of CurrentCulture says, not as the effective value selected in systems region settings says:

(e.g. for “de-DE” dd.MM.yyyy is used instead of selected yyyy-MM-dd)

Region settings: not the default but yyy-MM-dd is used

Is there a way Binding uses the correct format without defining ConverterCulture on every single Binding?

In code

string.Format("{0:d}",Date);

uses the right Culture settings.

edit:

another way which doesn’t work as desired (like this.Language = … does):

xmlns:glob="clr-namespace:System.Globalization;assembly=mscorlib"

and

<Binding Source="{x:Static glob:CultureInfo.CurrentCulture}" 
 Path="IetfLanguageTag" 
 ConverterCulture="{x:Static glob:CultureInfo.InvariantCulture}" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:28:14+00:00Added an answer on May 21, 2026 at 11:28 pm

    You can create a subclass of binding (e.g. CultureAwareBinding) which sets the ConverterCulture automatically to the current culture when created.

    It’s not a perfect solution, but it’s probably the only one, since retroactively forcing Binding to respect the culture could break other code in WPF which depends on this behavior.

    Let me know if you need more help!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 4-level tree structure, defined by: <HierarchicalDataTemplate DataType={x:Type src:Level1} ItemsSource={Binding Path=Level2Items}> <TextBlock
I have setup binding as follows XAML <TextBlock Text={Binding Path=Color, Converter={StaticResource ColorToStringConverter}} /> C#:
ViewModel I have a property of type Member called KeyMember . The 'Member' type
I have a rather simple user control (RatingControl) that has a dependency property defined
I was wondering if it's possible to have the following type of binding, and
I have a model with an enum property (in this case, related to Export
In case I have .NET framework installed in my computer + all the necessary
Here's my case: I have a table view showing contacts. Add button in the
In my case I have panels,but to make it clear I will use buttons
I have a regular .NET application. In this case I have a part that's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.