Ejemplo n.º 1
0
 private static void CustomizeExportingHandler(object sender, GridExcelExportingEventArgs e)
 {
     if ((e.CellType == ExportCellType.RecordCell))
     {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.Violet);
     }
 }
Ejemplo n.º 2
0
        private static void ExportingHandler(object sender, GridExcelExportingEventArgs e)
        {
            if (e.CellType == ExportCellType.HeaderCell)
            {
                if (e.Level == 0)
                {
                    e.CellStyle.BackGroundBrush = new SolidColorBrush(Color.FromArgb(255, 155, 194, 230));
                }
                else
                {
                    e.CellStyle.BackGroundBrush = new SolidColorBrush(Color.FromArgb(255, 146, 208, 80));
                }

                e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.White);
                e.CellStyle.FontInfo.Bold   = true;
            }
            if (e.CellType == ExportCellType.RecordCell)
            {
                e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.Crimson);
            }

            e.CellStyle.FontInfo.Size     = 12;
            e.CellStyle.FontInfo.FontName = "Segoe UI";
            e.Handled = true;
        }
Ejemplo n.º 3
0
 private static void ExportingHandler(object sender, GridExcelExportingEventArgs e)
 {
     if (e.CellType == ExportCellType.HeaderCell)
     {
         e.CellStyle.FontInfo.Bold = true;
     }
     e.CellStyle.FontInfo.Size     = 12;
     e.CellStyle.FontInfo.FontName = "Segoe UI";
 }
 private static void ExportingHandler(object sender, GridExcelExportingEventArgs e)
 {
     if (e.CellType == ExportCellType.HeaderCell)
     {
     }
     else if (e.CellType == ExportCellType.RecordCell)
     {
     }
 }
Ejemplo n.º 5
0
 public void exportingHandler(object sender, GridExcelExportingEventArgs args)
 {
     if (args.CellType == ExportCellType.HeaderCell)
     {
         args.CellStyle.BackGroundBrush   = new SolidColorBrush(Colors.OrangeRed);
         args.CellStyle.ForeGroundBrush   = new SolidColorBrush(Colors.White);
         args.CellStyle.FontInfo.Bold     = true;
         args.CellStyle.FontInfo.FontName = "Segoe UI";
     }
 }
Ejemplo n.º 6
0
 private static void exportingHandler(object sender, GridExcelExportingEventArgs args)
 {
     if (args.CellType == ExportCellType.HeaderCell)
     {
         args.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.Red);
         args.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.White);
         args.CellStyle.FontInfo.Bold   = true;
         args.CellStyle.FontInfo.Size   = 16;
     }
 }
 public void exportingHandler(object sender, GridExcelExportingEventArgs args)
 {
     if (args.CellType == ExportCellType.HeaderCell)
     {
         args.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.OrangeRed);
         args.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.White);
         args.CellStyle.FontInfo.Bold = true;
         args.CellStyle.FontInfo.FontName = "Segoe UI";
     }
 }
Ejemplo n.º 8
0
 private static void ExportingHandler(object sender, GridExcelExportingEventArgs e)
 {
     if (e.CellType == ExportCellType.HeaderCell)
     {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSteelBlue);
         e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.DarkRed);
         e.CellStyle.FontInfo.Bold   = true;
     }
     e.CellStyle.FontInfo.Size     = 12;
     e.CellStyle.FontInfo.FontName = "Segoe UI";
 }
 private static void ExportingHandler(object sender, GridExcelExportingEventArgs e)
 {
     if (e.CellType == ExportCellType.HeaderCell)
     {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(gridHeaderBackgroundColor);
         e.CellStyle.ForeGroundBrush = new SolidColorBrush(gridHeaderForeGroundColor);
     }
     else if (e.CellType == ExportCellType.RecordCell)
     {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(gridCellBackgroundColor);
     }
     e.Handled = true;
 }
Ejemplo n.º 10
0
        } // end method DatePickerStartDate_DateTimeChanged

        // A handler for styling the created workbooks.
        private static void ExcelExportingHandler(object sender, GridExcelExportingEventArgs e)
        {
            if (e.CellType == ExportCellType.HeaderCell || e.CellType == ExportCellType.StackedHeaderCell)
            {
                e.CellStyle.BackGroundBrush = Properties.Settings.Default.ExcelHeaderBackground;
                e.Style.HorizontalAlignment = ExcelHAlign.HAlignCenter;
                e.Style.VerticalAlignment = ExcelVAlign.VAlignCenter;
            } // end if

            e.CellStyle.FontInfo.FontName = Properties.Settings.Default.ExcelCellFontFamilyName;
            e.CellStyle.FontInfo.Size = Properties.Settings.Default.ExcelCellFontSize;
            e.Handled = true;
        } // end method ExcelExportingHandler
Ejemplo n.º 11
0
 public void exportingHandler(object sender, GridExcelExportingEventArgs e)
 {
     if (e.CellType == ExportCellType.HeaderCell)
     {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSteelBlue);
         e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.DarkRed);
         e.CellStyle.FontInfo.Bold   = true;
     }
     else if (e.CellType == ExportCellType.GroupCaptionCell)
     {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSlateGray);
         e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.LightYellow);
     }
     else if (e.CellType == ExportCellType.GroupSummaryCell)
     {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightGray);
     }
     e.CellStyle.FontInfo.FontName = "Segoe UI";
     e.Handled = true;
 }
Ejemplo n.º 12
0
 public void CustomizedexportingHandler(object sender, GridExcelExportingEventArgs e) {
     if ((e.CellType == ExportCellType.RecordCell))
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.Violet);
 }
Ejemplo n.º 13
0
 public void exportingHandler(object sender, GridExcelExportingEventArgs e) {
     if (e.CellType == ExportCellType.HeaderCell) {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSteelBlue);
         e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.DarkRed);
         e.CellStyle.FontInfo.Bold = true;
     }
     else if (e.CellType == ExportCellType.GroupCaptionCell) {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightSlateGray);
         e.CellStyle.ForeGroundBrush = new SolidColorBrush(Colors.LightYellow);
     }
     else if (e.CellType == ExportCellType.GroupSummaryCell) {
         e.CellStyle.BackGroundBrush = new SolidColorBrush(Colors.LightGray);
     }
     e.CellStyle.FontInfo.FontName = "Segoe UI";
 }