In my WPF application, I want to give the user the ability to present all dates in different time zones. That is, save the data as is, but only present them differently in the TextBlock text binding prior to DateTime .
I try to achieve this without introducing the type of packaging or using converters . This will be a bad design, as it can easily be missed by other developers who will work on the code. In addition, this way existing code can be saved.
Is there a way to intervene in serializing DateTime into a string inside a TextBlock binding and insert my own logic there? using your own serializer?
Or else, is there a way to override the underlying DateTime.ToString () method and insert my own logic there?
source
share