When I did following code: TextAlignmentConverter textAlignmentConverter = new TextAlignmentConverter(); var abc = (TextAlignment)(textAlignmentConverter.ConvertFromInvarian