You need to handle the problem in three places:
1. Define Convertor
Public class RememberStatusConvertor: IValueConverter
{
Public object Convert (object value, Type targetType, object parameter, CultureInfo culture)
{
Var rememberStatus = (RememberStatus) value;
Switch (rememberStatus)
{
Case RememberStatus. NotRemember:
Return "(none )";
Case RememberStatus. Remembering:
Return "memory ...";
Default:
Return "remembered ";
}
}
Public object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture)
{
Throw new NotImplementedException ();
}
}
2. Add resources to the XAML File
<BLL:RememberStatusConvertor x:Key="rememberStatusConvertor"/>
3. Use resources in XAML
<TextBlock Grid.Column="2" Text="{Binding Path=Word.RememberStatus,Converter={StaticResource rememberStatusConvertor}}"
FontSize="28" Style="{StaticResource listboxTextBlock}"/>