1)根据名称查找

 PrintPreview fe = new PrintPreview(new Summary());
 string strResourceHeader = "headerStyle" + styleSize.ToString();

 HeaderStyle = (Style)fe.FindResource(strResourceHeader);

2)根据名称直接获取

 Style baseStyle = this.Resources["gridRowStyle"] as Style;