//FontStyle同时是bold,Underline,Strikeout风格:
FontStyle style = FontStyle.Regular;
style |= FontStyle.Bold;
style |= FontStyle.Italic;
//如果是去掉某一种的话是:
style-=FontStyle.Bold;
//將String转换成FontStyle枚举
FontStyle fsStyle = (FontStyle)Enum.Parse(typeof(FontStyle), sContentFontStyle);
sContentFontStyle為FontStyle的string值,多個時以","分隔 。如:
FontStyle fsStyle = (FontStyle)Enum.Parse(typeof(FontStyle), "Bold,Italic,Underline,Strikeout");