robert-j-engdahl / ngettext-wpf

Proper internationalization support for WPF (via NGettext)
GNU Lesser General Public License v3.0
10 stars 12 forks source link

GettextFormatConverter returns empty string when binding value is null #36

Open Jogge opened 5 years ago

Jogge commented 5 years ago

I'm trying to bind to this property with the GettextFormatConverter and the value of Date is null:

public Class SomeClass {
    public DateTime? Date { get; set; } = null
}
<TextBlock Text="{Binding SomeClass.Date, Mode=OneWay, Converter={wpf:GettextFormatConverter Date: {0}}}" />

Expected result: Date:

Result: