vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
NEU! sevCoolbar 3.0 - Professionelle Toolbars im modernen Design!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Ein- und Umsteiger
Re: Währungsformat in WPF 
Autor: Maas
Datum: 18.10.11 09:11

20 Sekunden googeln: http://connect.microsoft.com/VisualStudio/feedback/details/442569/wpf-binding-uses-the-wrong-currentculture-by-default

Microsoft:
Zitat:


Binding converters never use the CurrentCulture - this is by design, so that their behavior is predictable across all machines and regional settings.

However, you can specify the culture a converter should use. There are two ways to do this:
1. Set Binding.ConverterCulture. E.g. <TextBox Text="{Binding Birthday, ConverterCulture=de-DE}"/>
2. Set the xml:lang (or equivalently, Language) property on the target element. E.g. <TextBox xml:lang="de-DE" Text="{Binding Birthday}"/>

The converter uses the ConverterCulture if present, and the xml:lang otherwise. The latter property is always defined - it defaults to "en-US". It's an inherited property, so you can set xml:lang="de-DE" on the root element of your markup to get all the converters on the page to use the desired culture.


Übrigens ist WPF nur so sch..., wenn man es nicht verstanden hat. Das gilt aber für so ziemlich alles im Leben.

Wieso hast du deine Rechnung eigentlich als Ressource definiert? Geht doch viel besser mit DataContext (und ist auch so vorgesehen).

Maas
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Währungsformat in WPF1.689Mäxx18.10.11 08:32
Re: Währungsformat in WPF1.330Maas18.10.11 09:11
Re: Währungsformat in WPF1.097Mäxx18.10.11 09:16
Re: Währungsformat in WPF1.111Maas18.10.11 09:32
Re: Währungsformat in WPF1.237Mäxx18.10.11 09:34
Re: Währungsformat in WPF1.156Maas18.10.11 09:52
Re: Währungsformat in WPF1.100Mäxx18.10.11 10:10
Re: Währungsformat in WPF1.074Maas18.10.11 10:17
Re: Währungsformat in WPF1.082Mäxx18.10.11 10:23
Re: Währungsformat in WPF1.085Maas18.10.11 10:45
Re: Währungsformat in WPF1.047Mäxx18.10.11 10:50
Re: Währungsformat in WPF1.172Drapondur18.10.11 12:42
Re: Währungsformat in WPF1.092Mäxx18.10.11 12:45
Re: Währungsformat in WPF1.146Maas18.10.11 13:00
Re: Währungsformat in WPF1.066Drapondur18.10.11 19:07
Re: Währungsformat in WPF1.282Drapondur20.10.11 04:57
Re: Währungsformat in WPF1.188Maas20.10.11 08:32

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel