'宣言 Public Shared Sub SetExcelCellFormatSettings( _ ByVal d As DependencyObject, _ ByVal value As FormatSettings _ )
public static void SetExcelCellFormatSettings( DependencyObject d, FormatSettings value )
Dim cellFormatSettings As New FormatSettings() cellFormatSettings.BorderColor = Colors.Blue cellFormatSettings.BorderStyle = Infragistics.Excel.CellBorderLineStyle.Double cellFormatSettings.FillPattern = Infragistics.Excel.FillPatternStyle.DiagonalStripe cellFormatSettings.FillPatternForegroundColor = Colors.White cellFormatSettings.FillPatternBackgroundColor = Colors.Black cellFormatSettings.FontColor = Colors.Red cellFormatSettings.FontFamily = New FontFamily("Times New Roman") cellFormatSettings.FontSize = New Infragistics.Windows.DeviceUnitLength(14, Infragistics.Windows.DeviceUnitType.Point) cellFormatSettings.FontWeight = FontWeights.Bold cellFormatSettings.HorizontalAlignment = Infragistics.Excel.HorizontalCellAlignment.Center DataPresenterExcelExporter.SetExcelCellFormatSettings(Me.Grid.FieldSettings, cellFormatSettings)
FormatSettings cellFormatSettings = new FormatSettings(); cellFormatSettings.BorderColor = Colors.Blue; cellFormatSettings.BorderStyle = Infragistics.Excel.CellBorderLineStyle.Double; cellFormatSettings.FillPattern = Infragistics.Excel.FillPatternStyle.DiagonalStripe; cellFormatSettings.FillPatternForegroundColor = Colors.White; cellFormatSettings.FillPatternBackgroundColor = Colors.Black; cellFormatSettings.FontColor = Colors.Red; cellFormatSettings.FontFamily = new FontFamily("Times New Roman"); cellFormatSettings.FontSize = new Infragistics.Windows.DeviceUnitLength(14, Infragistics.Windows.DeviceUnitType.Point); cellFormatSettings.FontWeight = FontWeights.Bold; cellFormatSettings.HorizontalAlignment = Infragistics.Excel.HorizontalCellAlignment.Center; DataPresenterExcelExporter.SetExcelCellFormatSettings(this.Grid.FieldSettings, cellFormatSettings);