Version

FillPatternForegroundColor Property

Gets or sets the foreground color of the cells in a field.
Syntax
'Declaration
 
Public Property FillPatternForegroundColor As Nullable(Of Color)
public Nullable<Color> FillPatternForegroundColor {get; set;}
Remarks
If the foreground color is set to a non-default value and the FillPattern is set to Default, the resolved fill pattern style is Solid. There, a solid cell color can easily be applied by setting only the FillPatternForegroundColor.
Example
The following snippet demonstrates how to set the default appearances for all labels that are exported.

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);
<igDP:XamDataGrid.FieldSettings>
    
<igDP:FieldSettings>
        
<igExcelExporter:DataPresenterExcelExporter.ExcelLabelFormatSettings>
            
<igExcelExporter:FormatSettings 
                
BorderColor="Blue"
                
BorderStyle="Double"
                
FillPatternForegroundColor="White" 
                
FillPatternBackgroundColor="Black"
                
FillPattern="DiagonalStripe"
                
FontColor="Red"
                
FontFamily="Times New Roman"
                
FontWeight="Bold"
                
HorizontalAlignment="Center">
                
<igExcelExporter:FormatSettings.FontSize>
                    
<igWindows:DeviceUnitLength UnitType="Point" Value="14" />
                
</igExcelExporter:FormatSettings.FontSize>
            
</igExcelExporter:FormatSettings>
        
</igExcelExporter:DataPresenterExcelExporter.ExcelLabelFormatSettings>
    
</igDP:FieldSettings>            
</igDP:XamDataGrid.FieldSettings>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also