'宣言 Public Property FontWeight As Nullable(Of FontWeight)
public Nullable<FontWeight> FontWeight {get; set;}
注: Excel ではサポートされていないフォントの太さがあるため、値は Excel でサポートされているフォントの太さに一番近い太さに変換されます。
Dim labelFormatSettings As New FormatSettings() labelFormatSettings.BorderColor = Colors.Blue labelFormatSettings.BorderStyle = Infragistics.Excel.CellBorderLineStyle.Double labelFormatSettings.FillPattern = Infragistics.Excel.FillPatternStyle.DiagonalStripe labelFormatSettings.FillPatternForegroundColor = Colors.White labelFormatSettings.FillPatternBackgroundColor = Colors.Black labelFormatSettings.FontColor = Colors.Red labelFormatSettings.FontFamily = New FontFamily("Times New Roman") labelFormatSettings.FontSize = New Infragistics.Windows.DeviceUnitLength(14, Infragistics.Windows.DeviceUnitType.Point) labelFormatSettings.FontWeight = FontWeights.Bold labelFormatSettings.HorizontalAlignment = Infragistics.Excel.HorizontalCellAlignment.Center DataPresenterExcelExporter.SetExcelLabelFormatSettings(Me.Grid.FieldSettings, labelFormatSettings)
FormatSettings labelFormatSettings = new FormatSettings(); labelFormatSettings.BorderColor = Colors.Blue; labelFormatSettings.BorderStyle = Infragistics.Excel.CellBorderLineStyle.Double; labelFormatSettings.FillPattern = Infragistics.Excel.FillPatternStyle.DiagonalStripe; labelFormatSettings.FillPatternForegroundColor = Colors.White; labelFormatSettings.FillPatternBackgroundColor = Colors.Black; labelFormatSettings.FontColor = Colors.Red; labelFormatSettings.FontFamily = new FontFamily("Times New Roman"); labelFormatSettings.FontSize = new Infragistics.Windows.DeviceUnitLength(14, Infragistics.Windows.DeviceUnitType.Point); labelFormatSettings.FontWeight = FontWeights.Bold; labelFormatSettings.HorizontalAlignment = Infragistics.Excel.HorizontalCellAlignment.Center; DataPresenterExcelExporter.SetExcelLabelFormatSettings(this.Grid.FieldSettings, labelFormatSettings);