枚举
m_Theme.HorizontalAlignment = (HorizontalAlignment)Enum.Parse(typeof(HorizontalAlignment), m_HorizontalAlignment);
结构
m_Theme.FontWeight = (FontWeight)System.ComponentModel.TypeDescriptor.GetConverter(typeof(FontWeight)).ConvertFromString(m_FontWeightName);