formatting-culture-aware-data

Solid

Formats dates, numbers, and currency with culture awareness in WPF. Use when displaying localized data formats or building international applications.

Data & Documents 40 stars 6 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Culture-Aware Data Formatting in WPF Format dates, numbers, and currency based on user's culture preferences. ## 1. Culture Formatting Overview | Data Type | en-US | ko-KR | de-DE | |-----------|-------|-------|-------| | Date (d) | 1/21/2026 | 2026-01-21 | 21.01.2026 | | Currency (C) | $1,234.56 | ₩1,235 | 1.234,56 € | | Number (N2) | 1,234.56 | 1,234.56 | 1.234,56 | | Percent (P) | 75.00% | 75.00% | 75,00 % | --- ## 2. XAML Formatting ### 2.1 Date Formatting ```xml <!-- Short date (culture-aware) --> <TextBlock Text="{Binding Date, StringFormat={}{0:d}}"/> <!-- Long date --> <TextBlock Text="{Binding Date, StringFormat={}{0:D}}"/> <!-- Custom format (not culture-aware) --> <TextBlock Text="{Binding Date, StringFormat={}{0:yyyy-MM-dd}}"/> <!-- Date and time --> <TextBlock Text="{Binding Date, StringFormat={}{0:g}}"/> ``` ### 2.2 Number Formatting ```xml <!-- Number with 2 decimal places --> <TextBlock Text="{Binding Amount, StringFormat={}{0:N2}}"/> <!-- Number with no decimals --> <TextBlock Text="{Binding Count, StringFormat={}{0:N0}}"/> <!-- Fixed decimal places --> <TextBlock Text="{Binding Value, StringFormat={}{0:F2}}"/> ``` ### 2.3 Currency Formatting ```xml <!-- Currency (culture-aware symbol and format) --> <TextBlock Text="{Binding Price, StringFormat={}{0:C}}"/> <!-- Currency with no decimals --> <TextBlock Text="{Binding Price, StringFormat={}{0:C0}}"/> ``` ### 2.4 Percent Formatting ```xml <!-- Percent (multiplies by 100) --> <TextBlock Text...

Details

Author
christian289
Repository
christian289/dotnet-with-claudecode
Created
7 months ago
Last Updated
6 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category