public HeaderPanel() : base() { InitializeComponent(); this.Font = new Font(SystemFonts.CaptionFont, SystemFonts.CaptionFont.Style); this.mstr_CaptionText = this.GetType().Name; this.mint_CaptionHeight = SystemInformation.CaptionHeight; this.mclr_CaptionBeginColor = Color.FromKnownColor(KnownColor.InactiveCaption); this.mclr_CaptionEndColor = Color.FromKnownColor(KnownColor.ActiveCaption); this.menm_CaptionGradientMode = LinearGradientMode.Vertical; this.menm_CaptionPosition = CaptionPositions.Top; this.menm_BorderStyle = BorderStyles.Shadow; base.BorderStyle = 0; this.mclr_BorderColor = Color.FromKnownColor(KnownColor.ActiveCaption); this.mclr_StartColor = Color.FromKnownColor(KnownColor.Window); this.mclr_EndColor = Color.FromKnownColor(KnownColor.Window); this.menm_GradientMode = LinearGradientMode.Vertical; this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); }
/// <summary> /// Remove _axisIndicatorBorderElement effect /// </summary> public static void RemoveBorderEffect(Shape shape, BorderStyles borderStyle, Double borderThickness, Brush lineColor) { shape.Stroke = lineColor; shape.StrokeThickness = borderThickness; shape.StrokeStartLineCap = PenLineCap.Flat; shape.StrokeEndLineCap = PenLineCap.Flat; shape.StrokeDashOffset = 0; shape.StrokeLineJoin = PenLineJoin.Bevel; shape.StrokeDashArray = Graphics.LineStyleToStrokeDashArray(borderStyle.ToString()); }
/// <summary> /// Remove _axisIndicatorBorderElement effect /// </summary> public static void RemoveBorderEffect(Shape shape, BorderStyles borderStyle, Double borderThickness, Brush lineColor, Brush fillColor, Double width, Double height) { RemoveBorderEffect(shape, borderStyle, borderThickness, lineColor); shape.Fill = fillColor; shape.Height = height; shape.Width = width; shape.SetValue(Canvas.TopProperty, -shape.Height / 2); shape.SetValue(Canvas.LeftProperty, -shape.Width / 2); }
/// <summary> /// Apply border effect /// </summary> public static void ApplyBorderEffect(Shape shape, BorderStyles borderStyles, Brush fillColor, Double scaleFactor, Double borderThickness, Brush borderColor) { ApplyBorderEffect(shape, borderStyles, borderThickness, borderColor); shape.Fill = fillColor; shape.Height *= scaleFactor; shape.Width *= scaleFactor; shape.SetValue(Canvas.TopProperty, -shape.Height / 2); shape.SetValue(Canvas.LeftProperty, -shape.Width / 2); }
/// <summary> /// Remove border effect /// </summary> public static void RemoveBorderEffect(Shape shape, BorderStyles borderStyle, Double borderThickness, Brush lineColor) { shape.Stroke = lineColor; shape.StrokeThickness = borderThickness; shape.StrokeStartLineCap = PenLineCap.Flat; shape.StrokeEndLineCap = PenLineCap.Flat; shape.StrokeDashOffset = 0; shape.StrokeLineJoin = PenLineJoin.Bevel; shape.StrokeDashArray = Graphics.LineStyleToStrokeDashArray(borderStyle.ToString()); }
/// <summary> /// Remove border effect /// </summary> public static void RemoveBorderEffect(Shape shape, BorderStyles borderStyle, Double borderThickness, Brush lineColor, Brush fillColor, Double width, Double height) { RemoveBorderEffect(shape, borderStyle, borderThickness, lineColor); shape.Fill = fillColor; shape.Height = height; shape.Width = width; shape.SetValue(Canvas.TopProperty, -shape.Height / 2); shape.SetValue(Canvas.LeftProperty, -shape.Width / 2); }
/// <summary> /// Apply border effect /// </summary> /// <param name="shape">Shape</param> /// <param name="borderStyles">BorderStyles</param> /// <param name="borderThickness">Double</param> /// <param name="borderColor">Brush</param> public static void ApplyBorderEffect(Shape shape, BorderStyles borderStyles, Double borderThickness, Brush borderColor) { shape.Stroke = borderColor; shape.StrokeThickness = borderThickness; shape.StrokeStartLineCap = PenLineCap.Round; shape.StrokeEndLineCap = PenLineCap.Round; shape.StrokeDashOffset = 0.4; shape.StrokeLineJoin = PenLineJoin.Bevel; shape.StrokeDashArray = Graphics.LineStyleToStrokeDashArray(borderStyles.ToString()); }
/// <summary> /// Apply _axisIndicatorBorderElement effect /// </summary> public static void ApplyBorderEffect(Shape shape, BorderStyles borderStyles, Brush fillColor, Double scaleFactor, Double borderThickness, Brush borderColor) { ApplyBorderEffect(shape, borderStyles, borderThickness, borderColor); shape.Fill = fillColor; shape.Height *= scaleFactor; shape.Width *= scaleFactor; shape.SetValue(Canvas.TopProperty, -shape.Height / 2); shape.SetValue(Canvas.LeftProperty, -shape.Width / 2); }
/// <summary> /// Apply border effect /// </summary> /// <param name="shape">Shape</param> /// <param name="borderStyles">BorderStyles</param> /// <param name="borderThickness">Double</param> /// <param name="borderColor">Brush</param> public static void ApplyBorderEffect(Shape shape, BorderStyles borderStyles, Double borderThickness, Brush borderColor) { shape.Stroke = borderColor; shape.StrokeThickness = borderThickness; shape.StrokeStartLineCap = PenLineCap.Round; shape.StrokeEndLineCap = PenLineCap.Round; shape.StrokeDashOffset = 0.4; shape.StrokeLineJoin = PenLineJoin.Bevel; shape.StrokeDashArray = Graphics.LineStyleToStrokeDashArray(borderStyles.ToString()); }
public Brush GetBorderBrush(BorderStyles style) { switch (style) { case BorderStyles.None: return(Brushes.Transparent); case BorderStyles.Solid: return(new SolidColorBrush(CellBorderColor)); } return(Brushes.Transparent); }
int zoomLevel; //How 'far out' the image is zoomed, e.g. 1 = actual size, 2 = 50%, 4 = 25% etc. public PictureBox(int x, int y, int width, int height, BorderStyles border = BorderStyles.none, ConsoleColor foreColour = ConsoleColor.White, Image image = new Image()) { this.xPosition = x; this.yPosition = y; this.width = width; this.height = height; this.border = border; this.foreColour = foreColour; this.image = image; imageX = 0; imageY = 0; }
private static CellFormat CreateCellStyle(CellFormats format, bool applyNumberFormat = true , FontStyles fontStyle = FontStyles.StandardCalibri , BorderStyles borderStyle = BorderStyles.NoBorder , FillStyles fillStyle = FillStyles.Empty) { var cellFormat = new CellFormat(); cellFormat.NumberFormatId = (uint)format; cellFormat.FontId = (uint)fontStyle; cellFormat.FillId = (uint)fillStyle; cellFormat.BorderId = (uint)borderStyle; cellFormat.FormatId = 0; cellFormat.ApplyNumberFormat = BooleanValue.FromBoolean(applyNumberFormat); return cellFormat; }
public TabControlConstructor(Control controlToAttach, string skinName, DefaultBoolean headerAutoFill, int selectedtabIndex, DockStyle dockStyle, BorderStyles borderStyles, BorderStyles borderStylePage, TabHeaderLocation tabHeaderLocation, bool showPreviousAndNextButtons, TabButtonShowMode tabButtonShowMode, TabOrientation tabOrientation, List <TabPageControlConstructor> tabPagesList) { ParentControlToAttach = controlToAttach; SkinName = skinName; HeaderAutoFill = headerAutoFill; SelectedTabIndex = selectedtabIndex; DockStyle = dockStyle; BorderStyles = borderStyles; BorderStylePage = borderStylePage; TabHeaderLocation = tabHeaderLocation; ShowPreviousAndNextButtons = showPreviousAndNextButtons; TabButtonShowMode = tabButtonShowMode; TabOrientation = tabOrientation; TabPagesList = tabPagesList; }
/// <summary> /// Initializes a new instance of the <see cref="Borders" /> class. /// By Default, it creates all border elements with BorderStyles.None /// </summary> /// <param name="border">The border.</param> public Borders(BorderStyles border) { Top = new Border { BorderType = BorderType.Top, BorderStyle = border, Color = Color.Black }; Bottom = new Border { BorderType = BorderType.Bottom, BorderStyle = border, Color = Color.Black }; Right = new Border { BorderType = BorderType.Right, BorderStyle = border, Color = Color.Black }; Left = new Border { BorderType = BorderType.Left, BorderStyle = border, Color = Color.Black }; Diagonal = new Border { BorderType = BorderType.Diagonal, BorderStyle = border, Color = Color.Black }; }
/// <summary> /// Draws a box at the specified location. /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="border"></param> public void DrawBox(int x, int y, int width, int height, BorderStyles border, ConsoleColor foreColour, ConsoleColor backColour) { switch (border) { case BorderStyles.oneLine: //Place corners WriteChar(x, y, '┌', foreColour, backColour); WriteChar(x + (width - 1), y, '┐', foreColour, backColour); WriteChar(x + (width - 1), y + (height - 1), '┘', foreColour, backColour); WriteChar(x, y + (height - 1), '└', foreColour, backColour); //Place edges for (int tempY = y + 1; tempY < y + (height - 1); tempY++) { WriteChar(x, tempY, '│', foreColour, backColour); WriteChar(x + (width - 1), tempY, '│', foreColour, backColour); } for (int tempX = x + 1; tempX < x + (width - 1); tempX++) { WriteChar(tempX, y, '─', foreColour, backColour); WriteChar(tempX, y + (height - 1), '─', foreColour, backColour); } break; case BorderStyles.twoLine: //Place corners WriteChar(x, y, '╔', foreColour, backColour); WriteChar(x + (width - 1), y, '╗', foreColour, backColour); WriteChar(x + (width - 1), y + (height - 1), '╝', foreColour, backColour); WriteChar(x, y + (height - 1), '╚', foreColour, backColour); //Place edges for (int tempY = y + 1; tempY < y + (height - 1); tempY++) { WriteChar(x, tempY, '║', foreColour, backColour); WriteChar(x + (width - 1), tempY, '║', foreColour, backColour); } for (int tempX = x + 1; tempX < x + (width - 1); tempX++) { WriteChar(tempX, y, '═', foreColour, backColour); WriteChar(tempX, y + (height - 1), '═', foreColour, backColour); } break; } }
string[] buffer; //The contents of the log box. public LogBox(int x, int y, int width, int height, BorderStyles border = BorderStyles.none, ConsoleColor foreColour = ConsoleColor.White, ConsoleColor backColour = ConsoleColor.Black) { this.xPosition = x; this.yPosition = y; this.width = width; this.height = height; this.border = border; this.foreColour = foreColour; this.backColour = backColour; bufferSize = height; buffer = new string[bufferSize]; //fill the buffer with blank strings for (int i = 0; i < bufferSize; i++) { buffer[i] = ""; } }
public BorderInstance GetInstance() { if (this.m_owner.m_renderingContext.InstanceAccessDisallowed) { return(null); } if (this.m_instance == null) { BorderStyles defaultStyleValueIfExpressionNull = (BorderStyles)((!this.m_defaultSolidBorderStyle) ? 1 : 4); if (this.m_owner.IsOldSnapshot) { this.m_instance = new BorderInstance(this, null, defaultStyleValueIfExpressionNull); } else { this.m_instance = new BorderInstance(this, this.m_owner.ReportScope, defaultStyleValueIfExpressionNull); } } return(this.m_instance); }
public void SetAssignedDynamicValue(BorderStyleProperty prop, AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo value, bool allowTransparency) { switch (prop) { case BorderStyleProperty.Color: this.m_colorEvaluated = true; this.m_color = new ReportColor(value.Value, allowTransparency); break; case BorderStyleProperty.Style: this.m_styleEvaluated = true; this.m_style = (BorderStyles)value.IntValue; break; case BorderStyleProperty.Width: this.m_widthEvaluated = true; this.m_width = new ReportSize(value.Value); break; } }
internal BorderInstance GetInstance() { if (m_owner.m_renderingContext.InstanceAccessDisallowed) { return(null); } if (m_instance == null) { BorderStyles defaultStyleValueIfExpressionNull = (!m_defaultSolidBorderStyle) ? BorderStyles.None : BorderStyles.Solid; if (m_owner.IsOldSnapshot) { m_instance = new BorderInstance(this, null, defaultStyleValueIfExpressionNull); } else { m_instance = new BorderInstance(this, m_owner.ReportScope, defaultStyleValueIfExpressionNull); } } return(m_instance); }
void exporter_ExcelCellFormatting(object sender, Telerik.WinControls.UI.Export.ExcelML.ExcelCellFormattingEventArgs e) { if (e.GridRowInfoType == typeof(GridViewTableHeaderRowInfo)) { BorderStyles headerBorder = new BorderStyles(); headerBorder.Color = Color.Black; headerBorder.Weight = 2; headerBorder.LineStyle = LineStyle.Continuous; headerBorder.PositionType = PositionType.Bottom; e.ExcelStyleElement.Borders.Add(headerBorder); } else if (e.GridColumnIndex == radGridView1.Columns["SalesLastYear"].Index) { int value = Convert.ToInt32(radGridView1.Rows[e.GridRowIndex].Cells [e.GridColumnIndex].Value); if (value > 1500000) { e.ExcelStyleElement.InteriorStyle.Color = Color.Yellow; e.ExcelStyleElement.AlignmentElement.WrapText = true; } } }
/// <summary> /// Draws a box at the specified location. /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="border"></param> public void DrawBox(int x, int y, int width, int height, BorderStyles border, ConsoleColor foreColour, ConsoleColor backColour) { switch (border) { case BorderStyles.oneLine: //Place corners WriteChar(x, y, '┌', foreColour, backColour); WriteChar(x + (width - 1), y, '┐', foreColour, backColour); WriteChar(x + (width - 1), y + (height - 1), '┘', foreColour, backColour); WriteChar(x, y + (height - 1), '└', foreColour, backColour); //Place edges for (int tempY = y + 1; tempY < y + (height - 1); tempY++) { WriteChar(x, tempY, '│', foreColour, backColour); WriteChar(x + (width - 1), tempY, '│', foreColour, backColour); } for (int tempX = x + 1; tempX < x + (width - 1); tempX++) { WriteChar(tempX, y, '─', foreColour, backColour); WriteChar(tempX, y + (height - 1), '─', foreColour, backColour); } break; case BorderStyles.twoLine: //Place corners WriteChar(x, y, '╔', foreColour, backColour); WriteChar(x + (width - 1), y, '╗', foreColour, backColour); WriteChar(x + (width - 1), y + (height - 1), '╝', foreColour, backColour); WriteChar(x, y + (height - 1), '╚', foreColour, backColour); //Place edges for (int tempY = y + 1; tempY < y + (height - 1); tempY++) { WriteChar(x, tempY, '║', foreColour, backColour); WriteChar(x + (width - 1), tempY, '║', foreColour, backColour); } for (int tempX = x + 1; tempX < x + (width - 1); tempX++) { WriteChar(tempX, y, '═', foreColour, backColour); WriteChar(tempX, y + (height - 1), '═', foreColour, backColour); } break; } }
/// <summary> /// Draws a box at the specified location. /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="border"></param> public void DrawBox(int x, int y, int width, int height, BorderStyles border) { switch (border) { case BorderStyles.oneLine: //Place corners WriteChar(x, y, '┌'); WriteChar(x + (width - 1), y, '┐'); WriteChar(x + (width - 1), y + (height - 1), '┘'); WriteChar(x, y + (height - 1), '└'); //Place edges for (int tempY = y + 1; tempY < y + (height - 1); tempY++) { WriteChar(x, tempY, '│'); WriteChar(x + (width - 1), tempY, '│'); } for (int tempX = x + 1; tempX < x + (width - 1); tempX++) { WriteChar(tempX, y, '─'); WriteChar(tempX, y + (height - 1), '─'); } break; case BorderStyles.twoLine: //Place corners WriteChar(x, y, '╔'); WriteChar(x + (width - 1), y, '╗'); WriteChar(x + (width - 1), y + (height - 1), '╝'); WriteChar(x, y + (height - 1), '╚'); //Place edges for (int tempY = y + 1; tempY < y + (height - 1); tempY++) { WriteChar(x, tempY, '║'); WriteChar(x + (width - 1), tempY, '║'); } for (int tempX = x + 1; tempX < x + (width - 1); tempX++) { WriteChar(tempX, y, '═'); WriteChar(tempX, y + (height - 1), '═'); } break; } }
internal static byte?Translate(BorderStyles aValue) { switch (aValue) { case BorderStyles.Dashed: return(2); case BorderStyles.Dotted: return(1); case BorderStyles.Double: return(4); case BorderStyles.Solid: return(3); case BorderStyles.Default: return(null); default: return(0); } }
//Add styles to the exported file from telerik in type ExcelIM protected void CustomersGRD_OnExcelMLExportStylesCreated(object sender, GridExportExcelMLStyleCreatedArgs e) { // To set the Excel cell borders style BorderStylesCollection borders = new BorderStylesCollection(); BorderStyles borderStyle = null; for (int i = 1; i <= 4; i++) { borderStyle = new BorderStyles(); borderStyle.PositionType = (PositionType)i; borderStyle.Color = System.Drawing.Color.Black; borderStyle.LineStyle = LineStyle.Continuous; borderStyle.Weight = 1.0; borders.Add(borderStyle); } // styles have to set for export excel foreach (StyleElement style in e.Styles) { //For Header style - background color if (style.Id == "headerStyle") { style.InteriorStyle.Pattern = InteriorPatternType.Solid; style.InteriorStyle.Color = System.Drawing.Color.Gray; } //For alternate row style - background color if (style.Id == "alternatingItemStyle" || style.Id == "alternatingPriceItemStyle" || style.Id == "alternatingPercentItemStyle" || style.Id == "alternatingDateItemStyle") { style.InteriorStyle.Pattern = InteriorPatternType.Solid; style.InteriorStyle.Color = System.Drawing.Color.LightGray; } if ( style.Id.Contains("itemStyle") || style.Id == "priceItemStyle" || style.Id == "percentItemStyle" || style.Id == "dateItemStyle") { style.InteriorStyle.Pattern = InteriorPatternType.Solid; style.InteriorStyle.Color = System.Drawing.Color.White; } // for each cell border styles foreach (BorderStyles border in borders) { style.Borders.Add(border); } // Each cell text wrapping style.AlignmentElement.Attributes.Add("ss:WrapText", "1"); } }
int bufferSize; //The size of the text buffer #endregion Fields #region Constructors public LogBox(int x, int y, int width, int height, BorderStyles border = BorderStyles.none) { this.xPosition = x; this.yPosition = y; this.width = width; this.height = height; this.border = border; bufferSize = height; buffer = new string[bufferSize]; //fill the buffer with blank strings for (int i = 0; i < bufferSize; i++) buffer[i] = ""; }
public BorderInstance(Border owner, IReportScope reportScope, BorderStyles defaultStyleValueIfExpressionNull) : base(reportScope) { this.m_owner = owner; this.m_defaultStyleValueIfExpressionNull = defaultStyleValueIfExpressionNull; }
private void DrawBackground(PaintEventArgs peArgs, BorderStyles brdStyle) { LinearGradientBrush brsh = null; try { if (menm_BorderStyle == BorderStyles.Shadow) { brsh = new LinearGradientBrush(new Rectangle(0, 0, Width - DEFAULT_SHADOW_WIDTH, Height - DEFAULT_SHADOW_WIDTH), mclr_StartColor, mclr_EndColor, menm_GradientMode); peArgs.Graphics.FillRectangle(brsh, 0, 0, Width - DEFAULT_SHADOW_WIDTH, Height - DEFAULT_SHADOW_WIDTH); } else { brsh = new LinearGradientBrush(new Rectangle(0, 0, Width, Height), mclr_StartColor, mclr_EndColor, menm_GradientMode); peArgs.Graphics.FillRectangle(brsh, 0, 0, Width, Height); } } finally { if (brsh != null) { brsh.Dispose(); brsh = null; } } }
public static BorderStyles TranslateBorderStyle(string styleString, BorderStyles defaultStyle, IErrorContext errorContext) { if (styleString == null) { return(defaultStyle); } if (StyleTranslator.CompareWithInvariantCulture("None", styleString)) { return(BorderStyles.None); } if (StyleTranslator.CompareWithInvariantCulture("Solid", styleString)) { return(BorderStyles.Solid); } if (StyleTranslator.CompareWithInvariantCulture("Dashed", styleString)) { return(BorderStyles.Dashed); } if (StyleTranslator.CompareWithInvariantCulture("Dotted", styleString)) { return(BorderStyles.Dotted); } if (StyleTranslator.CompareWithInvariantCulture("DashDot", styleString)) { return(BorderStyles.DashDot); } if (StyleTranslator.CompareWithInvariantCulture("DashDotDot", styleString)) { return(BorderStyles.DashDotDot); } if (StyleTranslator.CompareWithInvariantCulture("Double", styleString)) { return(BorderStyles.Double); } if (StyleTranslator.CompareWithInvariantCulture("Groove", styleString)) { return(BorderStyles.Solid); } if (StyleTranslator.CompareWithInvariantCulture("Ridge", styleString)) { return(BorderStyles.Solid); } if (StyleTranslator.CompareWithInvariantCulture("Inset", styleString)) { return(BorderStyles.Solid); } if (StyleTranslator.CompareWithInvariantCulture("WindowInset", styleString)) { return(BorderStyles.Solid); } if (StyleTranslator.CompareWithInvariantCulture("Outset", styleString)) { return(BorderStyles.Solid); } if (StyleTranslator.CompareWithInvariantCulture("Default", styleString)) { return(defaultStyle); } if (errorContext != null) { errorContext.Register(ProcessingErrorCode.rsInvalidBorderStyle, Severity.Warning, styleString); } return(defaultStyle); }
int bufferSize; //The size of the text buffer #endregion Fields #region Constructors public LogBox(int x, int y, int width, int height, BorderStyles border = BorderStyles.none, ConsoleColor foreColour = ConsoleColor.White, ConsoleColor backColour = ConsoleColor.Black) { this.xPosition = x; this.yPosition = y; this.width = width; this.height = height; this.border = border; this.foreColour = foreColour; this.backColour = backColour; bufferSize = height; buffer = new string[bufferSize]; //fill the buffer with blank strings for (int i = 0; i < bufferSize; i++) buffer[i] = ""; }
int zoomLevel; //How 'far out' the image is zoomed, e.g. 1 = actual size, 2 = 50%, 4 = 25% etc. #endregion Fields #region Constructors public PictureBox(int x, int y, int width, int height, BorderStyles border = BorderStyles.none, ConsoleColor foreColour = ConsoleColor.White, Image image = new Image()) { this.xPosition = x; this.yPosition = y; this.width = width; this.height = height; this.border = border; this.foreColour = foreColour; this.image = image; imageX = 0; imageY = 0; }
/// <summary> /// Returns dash array for border /// </summary> /// <param name="borderStyle">BorderStyle as BorderStyles</param> /// <returns>DashArray as DoubleCollection</returns> internal static DoubleCollection GetDashArray(BorderStyles borderStyle) { return Graphics.LineStyleToStrokeDashArray(borderStyle.ToString()); }
void exporter_ExcelCellFormatting(object sender, Telerik.WinControls.UI.Export.ExcelML.ExcelCellFormattingEventArgs e) { BorderStyles borderRight = new BorderStyles(); borderRight.Color = Color.Black; borderRight.Weight = 1; borderRight.LineStyle = LineStyle.Continuous; borderRight.PositionType = PositionType.Right; e.ExcelStyleElement.Borders.Add(borderRight); BorderStyles borderLeft = new BorderStyles(); borderLeft.Color = Color.Black; borderLeft.Weight = 1; borderLeft.LineStyle = LineStyle.Continuous; borderLeft.PositionType = PositionType.Left; e.ExcelStyleElement.Borders.Add(borderLeft); BorderStyles borderTop = new BorderStyles(); borderTop.Color = Color.Black; borderTop.Weight = 1; borderTop.LineStyle = LineStyle.Continuous; borderTop.PositionType = PositionType.Top; e.ExcelStyleElement.Borders.Add(borderTop); BorderStyles borderBottom = new BorderStyles(); borderBottom.Color = Color.Black; borderBottom.Weight = 1; borderBottom.LineStyle = LineStyle.Continuous; borderBottom.PositionType = PositionType.Bottom; e.ExcelStyleElement.Borders.Add(borderBottom); if (e.GridRowInfoType == typeof(GridViewTableHeaderRowInfo)) { e.ExcelStyleElement.FontStyle.Bold = true; } e.ExcelStyleElement.AlignmentElement.WrapText = true; }
internal BorderInstance(Border owner, IReportScope reportScope, BorderStyles defaultStyleValueIfExpressionNull) : base(reportScope) { m_owner = owner; m_defaultStyleValueIfExpressionNull = defaultStyleValueIfExpressionNull; }