I'm using Infragistics UltraChart controls for displaying graphs. (Version 19.1)
My line chart graph is as below
Here Y-axis is noting but milliseconds(turn around time of Int64 type), I want to display it like "days:hh:mm:ss" format. Is it possible to display Y- axis lables in this format? while X axis is showing list of sample names (Which is of string type) The Ultra line chart data binding code is as below
ultraChartTAT.Data.DataSource = dsTAT.Tables["dtTAT"];
ultraChartTAT.Data.DataBind();
Here ultraChartTAT is an UltraChart infragistic control and dsTAT is a DataSet. The dsTAT.Tables["dtTAT"] design structure is as below
DataTable dtTAT = new DataTable("dtTAT");
dtTAT.Columns.Add("TAT", typeof(string));
dtTAT.Columns.Add("Sample1", typeof(Int64));
dtTAT.Columns.Add("Sample2", typeof(Int64));
dtTAT.Columns.Add("Sample3", typeof(Int64));
dtTAT.Columns.Add("Sample4", typeof(Int64));
dtTAT.Columns.Add("Sample5", typeof(Int64));
dtTAT.Columns.Add("Sample6", typeof(Int64));
dtTAT.Columns.Add("Sample7", typeof(Int64));
dtTAT.Columns.Add("Sample8", typeof(Int64));
For more reference take a look on this link https://stackoverflow.com/a/36329469/4524485
In case if any other information is required then add it in comment I'll update my question accordingly.
To format data for the X/Y axis labels the IRenderLabel interface can be used.
In example below the DateTimeRenderer class is using the IRenderLabel interface implementation to display Y-axis labels in the DateTime format:
For additional information see the Infragistics documentation:
http://help.infragistics.com/Help/Doc/WinForms/2011.1/CLR2.0/html/Chart_Customize_Labels_Using_the_IRenderLabel_Interface.html
DateTimeRenderer.cs
using Infragistics.UltraChart.Resources;
using System;
using System.Collections;
using System.Data;
namespace UltraGrid
{
public class DateTimeRenderer : IRenderLabel
{
readonly DataTable source;
public DateTimeRenderer(DataTable dt)
{
source = dt;
}
public string ToString(Hashtable context)
{
double dataValue = (double)context["DATA_VALUE"];
var dt = new DateTime((long)dataValue);
return dt.ToString("MM/dd/yyyy HH:mm:ss");
}
}
}
Form1.cs
using System;
using System.Collections;
using System.Data;
using System.Windows.Forms;
namespace UltraGrid
{
public partial class Form1 : Form
{
DataTable table = new DataTable("Statistics");
public Form1()
{
InitializeComponent();
// Create columns to hold sample data.
var column1 = new DataColumn("Sample", typeof(string));
var column2 = new DataColumn("Line1", typeof(Int64));
var column3 = new DataColumn("Line2", typeof(Int64));
var column4 = new DataColumn("Line3", typeof(Int64));
table.Columns.AddRange(new DataColumn[] { column1, column2, column3, column4 });
var now = DateTime.Now.Ticks;
var rnd = new Random();
for (int i = 1; i < 20; i++)
{
table.Rows.Add(new object[] { "Sample" + i.ToString(), now + rnd.Next(999, 3600000)*1000, now + rnd.Next(999, 3600000)*1000, now + rnd.Next(999, 3600000)*1000 });
}
}
private void LineChartStyles_Load(object sender, System.EventArgs e)
{
this.ultraChart1.Data.DataSource = table;
ultraChart1.Axis.Y.Labels.ItemFormatString = "<MY_VALUE>";
ultraChart1.Tooltips.FormatString = "<MY_VALUE>";
var MyLabelHashTable = new Hashtable { { "MY_VALUE", new DateTimeRenderer(table) } };
this.ultraChart1.LabelHash = MyLabelHashTable;
this.ultraChart1.Data.DataBind();
}
}
}
Form1.Designer.cs
namespace UltraGrid
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement1 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement2 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement3 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement4 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement5 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement6 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.LineChartAppearance lineChartAppearance1 = new Infragistics.UltraChart.Resources.Appearance.LineChartAppearance();
Infragistics.UltraChart.Resources.Appearance.LineAppearance lineAppearance1 = new Infragistics.UltraChart.Resources.Appearance.LineAppearance() { Thickness = 3 };
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement7 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.LineAppearance lineAppearance2 = new Infragistics.UltraChart.Resources.Appearance.LineAppearance() { Thickness = 3 };
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement8 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
Infragistics.UltraChart.Resources.Appearance.LineAppearance lineAppearance3 = new Infragistics.UltraChart.Resources.Appearance.LineAppearance() { Thickness = 3 };
Infragistics.UltraChart.Resources.Appearance.PaintElement paintElement9 = new Infragistics.UltraChart.Resources.Appearance.PaintElement();
this.ultraChart1 = new Infragistics.Win.UltraWinChart.UltraChart();
((System.ComponentModel.ISupportInitialize)(this.ultraChart1)).BeginInit();
this.SuspendLayout();
this.ultraChart1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.LineChart;
//
// ultraChart1
//
resources.ApplyResources(this.ultraChart1, "ultraChart1");
this.ultraChart1.Axis.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(248)))), ((int)(((byte)(220)))));
paintElement1.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.None;
paintElement1.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(248)))), ((int)(((byte)(220)))));
this.ultraChart1.Axis.PE = paintElement1;
this.ultraChart1.Axis.X.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.X.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.X.Labels.ItemFormatString = "<ITEM_LABEL>";
this.ultraChart1.Axis.X.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
this.ultraChart1.Axis.X.Labels.SeriesLabels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.X.Labels.SeriesLabels.FormatString = "";
this.ultraChart1.Axis.X.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.X.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
this.ultraChart1.Axis.X.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.X.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.X.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.X.Labels.Visible = true;
this.ultraChart1.Axis.X.LineThickness = 1;
this.ultraChart1.Axis.X.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.X.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.X.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.X.MajorGridLines.Visible = true;
this.ultraChart1.Axis.X.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.X.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.X.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.X.MinorGridLines.Visible = false;
this.ultraChart1.Axis.X.Visible = true;
this.ultraChart1.Axis.X2.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.X2.Labels.HorizontalAlign = System.Drawing.StringAlignment.Far;
this.ultraChart1.Axis.X2.Labels.ItemFormatString = "<ITEM_LABEL>";
this.ultraChart1.Axis.X2.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
this.ultraChart1.Axis.X2.Labels.SeriesLabels.FormatString = "";
this.ultraChart1.Axis.X2.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Far;
this.ultraChart1.Axis.X2.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.VerticalLeftFacing;
this.ultraChart1.Axis.X2.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.X2.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.X2.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.X2.Labels.Visible = false;
this.ultraChart1.Axis.X2.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.X2.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.X2.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.X2.MajorGridLines.Visible = true;
this.ultraChart1.Axis.X2.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.X2.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.X2.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.X2.MinorGridLines.Visible = false;
this.ultraChart1.Axis.X2.Visible = false;
this.ultraChart1.Axis.Y.Extent = 110;
this.ultraChart1.Axis.Y.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.Y.Labels.HorizontalAlign = System.Drawing.StringAlignment.Far;
this.ultraChart1.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:00.##>";
this.ultraChart1.Axis.Y.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Y.Labels.SeriesLabels.FormatString = "";
this.ultraChart1.Axis.Y.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Far;
this.ultraChart1.Axis.Y.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Y.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Y.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.Y.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Y.Labels.Visible = true;
this.ultraChart1.Axis.Y.LineThickness = 1;
this.ultraChart1.Axis.Y.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Y.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.Y.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Y.MajorGridLines.Visible = true;
this.ultraChart1.Axis.Y.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Y.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.Y.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Y.MinorGridLines.Visible = false;
this.ultraChart1.Axis.Y.TickmarkInterval = 50D;
this.ultraChart1.Axis.Y.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.AxisTickStyle.Smart;
this.ultraChart1.Axis.Y.Visible = true;
this.ultraChart1.Axis.Y2.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.Y2.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Y2.Labels.ItemFormatString = "<DATA_VALUE:00.##>";
this.ultraChart1.Axis.Y2.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.FormatString = "";
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Y2.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.Y2.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Y2.Labels.Visible = false;
this.ultraChart1.Axis.Y2.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Y2.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.Y2.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Y2.MajorGridLines.Visible = true;
this.ultraChart1.Axis.Y2.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Y2.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.Y2.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Y2.MinorGridLines.Visible = false;
this.ultraChart1.Axis.Y2.Visible = false;
this.ultraChart1.Axis.Z.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.Z.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Z.Labels.ItemFormatString = "";
this.ultraChart1.Axis.Z.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Z.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Z.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Z.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Z.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.Z.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Z.Labels.Visible = true;
this.ultraChart1.Axis.Z.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Z.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.Z.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Z.MajorGridLines.Visible = true;
this.ultraChart1.Axis.Z.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Z.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.Z.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Z.MinorGridLines.Visible = false;
this.ultraChart1.Axis.Z.Visible = false;
this.ultraChart1.Axis.Z2.Labels.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Axis.Z2.Labels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Z2.Labels.ItemFormatString = "";
this.ultraChart1.Axis.Z2.Labels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Z2.Labels.SeriesLabels.HorizontalAlign = System.Drawing.StringAlignment.Near;
this.ultraChart1.Axis.Z2.Labels.SeriesLabels.Orientation = Infragistics.UltraChart.Shared.Styles.TextOrientation.Horizontal;
this.ultraChart1.Axis.Z2.Labels.SeriesLabels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Z2.Labels.SeriesLabels.Visible = true;
this.ultraChart1.Axis.Z2.Labels.VerticalAlign = System.Drawing.StringAlignment.Center;
this.ultraChart1.Axis.Z2.Labels.Visible = false;
this.ultraChart1.Axis.Z2.MajorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Z2.MajorGridLines.Color = System.Drawing.Color.Gainsboro;
this.ultraChart1.Axis.Z2.MajorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Z2.MajorGridLines.Visible = true;
this.ultraChart1.Axis.Z2.MinorGridLines.AlphaLevel = ((byte)(255));
this.ultraChart1.Axis.Z2.MinorGridLines.Color = System.Drawing.Color.LightGray;
this.ultraChart1.Axis.Z2.MinorGridLines.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
this.ultraChart1.Axis.Z2.MinorGridLines.Visible = false;
this.ultraChart1.Axis.Z2.Visible = false;
this.ultraChart1.Border.CornerRadius = 5;
this.ultraChart1.ColorModel.AlphaLevel = ((byte)(150));
this.ultraChart1.ColorModel.ModelStyle = Infragistics.UltraChart.Shared.Styles.ColorModels.CustomLinear;
paintElement2.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement2.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(108)))), ((int)(((byte)(162)))), ((int)(((byte)(36)))));
paintElement2.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement2.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(244)))), ((int)(((byte)(17)))));
paintElement2.Stroke = System.Drawing.Color.Transparent;
paintElement3.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement3.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(108)))), ((int)(((byte)(176)))));
paintElement3.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement3.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(53)))), ((int)(((byte)(200)))), ((int)(((byte)(255)))));
paintElement3.Stroke = System.Drawing.Color.Transparent;
paintElement4.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement4.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(215)))), ((int)(((byte)(0)))), ((int)(((byte)(5)))));
paintElement4.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement4.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(117)))), ((int)(((byte)(16)))));
paintElement4.Stroke = System.Drawing.Color.Transparent;
paintElement5.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement5.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(190)))), ((int)(((byte)(2)))));
paintElement5.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement5.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(81)))));
paintElement5.Stroke = System.Drawing.Color.Transparent;
paintElement6.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.Gradient;
paintElement6.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(122)))), ((int)(((byte)(10)))));
paintElement6.FillGradientStyle = Infragistics.UltraChart.Shared.Styles.GradientStyle.Horizontal;
paintElement6.FillStopColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(208)))), ((int)(((byte)(66)))));
paintElement6.Stroke = System.Drawing.Color.Transparent;
this.ultraChart1.ColorModel.Skin.PEs.AddRange(new Infragistics.UltraChart.Resources.Appearance.PaintElement[] {
paintElement2,
paintElement3,
paintElement4,
paintElement5,
paintElement6});
this.ultraChart1.Data.EmptyStyle.LineStyle.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dash;
this.ultraChart1.Data.SwapRowsAndColumns = true;
this.ultraChart1.ForeColor = System.Drawing.SystemColors.ControlText;
this.ultraChart1.Legend.Font = new System.Drawing.Font("Verdana", 7F);
this.ultraChart1.Legend.Location = Infragistics.UltraChart.Shared.Styles.LegendLocation.Top;
this.ultraChart1.Legend.Visible = true;
lineAppearance1.IconAppearance.CharacterFont = new System.Drawing.Font("Microsoft Sans Serif", 12F);
paintElement7.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.None;
lineAppearance1.IconAppearance.PE = paintElement7;
lineAppearance1.Key = "Monday";
paintElement8.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.None;
lineAppearance2.IconAppearance.PE = paintElement8;
lineAppearance2.Key = "Tuesday";
lineAppearance2.LineStyle.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dash;
paintElement9.ElementType = Infragistics.UltraChart.Shared.Styles.PaintElementType.None;
lineAppearance3.IconAppearance.PE = paintElement9;
lineAppearance3.Key = "Wednesday";
lineAppearance3.LineStyle.DrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;
lineChartAppearance1.LineAppearances.Add(lineAppearance1);
lineChartAppearance1.LineAppearances.Add(lineAppearance2);
lineChartAppearance1.LineAppearances.Add(lineAppearance3);
this.ultraChart1.LineChart = lineChartAppearance1;
this.ultraChart1.Name = "ultraChart1";
this.ultraChart1.Tooltips.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F);
this.ultraChart1.Tooltips.HighlightFillColor = System.Drawing.Color.DimGray;
this.ultraChart1.Tooltips.HighlightOutlineColor = System.Drawing.Color.DarkGray;
//
// Form1
//
this.BackColor = System.Drawing.Color.White;
resources.ApplyResources(this, "$this");
this.Controls.Add(this.ultraChart1);
this.Name = "Form1";
this.Load += new System.EventHandler(this.LineChartStyles_Load);
((System.ComponentModel.ISupportInitialize)(this.ultraChart1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private Infragistics.Win.UltraWinChart.UltraChart ultraChart1;
}
}
Related
enter image description here
I am using a DataGridView in C# and I wanted to remove the Cell Border of DataGridView.
dataGrid = new DataGridView();
dataGrid.BackgroundColor = Control.DefaultBackColor;
dataGrid.AdvancedColumnHeadersBorderStyle = DataGridViewAdvancedCellBorderStyle.None;
dataGrid.AdvancedRowHeadersBorderStyle = DataGridViewAdvancedCellBorderStyle.None;
dataGrid.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(dataGrid_CellClick);
dataGrid.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(dataGrid_CellMouseEnter);
dataGrid.DataBindingComplete += new System.Windows.Forms.DataGridViewBindingCompleteEventHandler(dataGrid_DataBindingComplete);
dataGrid.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(dataGrid_CellPainting);
dataGrid.DataSource = this._lstWorklet;
dataGrid.Columns.Add("Action", "Action");
dataGrid.Size = new System.Drawing.Size(1018, 434);
dataGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
dataGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dataGrid.CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
dataGrid.DefaultCellStyle.SelectionBackColor = dataGrid.DefaultCellStyle.BackColor;
dataGrid.DefaultCellStyle.SelectionForeColor = dataGrid.DefaultCellStyle.ForeColor;
dataGrid.ReadOnly = true;
dataGrid.RowTemplate.Height = 48;
dataGrid.ColumnHeadersHeight = 48;
dataGrid.RowHeadersVisible = false;
dataGrid.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dataGrid.ColumnHeadersDefaultCellStyle.Font = new Font(dataGrid.Font, FontStyle.Bold);
dataGrid.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
dataGrid.MultiSelect = false;
i get sitcon cant be foundt
Warning MSB3245 Could not resolve this reference. Could not locate the assembly "Siticone.UI". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
and
Error CS0400 The type or namespace name 'Siticone' could not be found in the global namespace (are you missing an assembly reference?)
my code is here
{
// Token: 0x02000002 RID: 2
public partial class Register : global::System.Windows.Forms.Form
{
// Token: 0x06000011 RID: 17 RVA: 0x0000215C File Offset: 0x0000035C
protected override void Dispose(bool disposing)
{
bool flag = disposing && this.components != null;
if (flag)
{
this.components.Dispose();
}
base.Dispose(disposing);
}
// Token: 0x06000012 RID: 18 RVA: 0x00002194 File Offset: 0x00000394
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
Siticone.UI.AnimatorNS.Animation animation2 = new Siticone.UI.AnimatorNS.Animation();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Register));
this.siticoneDragControl1 = new Siticone.UI.WinForms.SiticoneDragControl(this.components);
this.siticoneControlBox1 = new Siticone.UI.WinForms.SiticoneControlBox();
this.siticoneControlBox2 = new Siticone.UI.WinForms.SiticoneControlBox();
this.siticoneTransition1 = new Siticone.UI.WinForms.SiticoneTransition();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.siticoneRoundedButton1 = new Siticone.UI.WinForms.SiticoneRoundedButton();
this.siticoneRoundedButton2 = new Siticone.UI.WinForms.SiticoneRoundedButton();
this.siticoneImageButton1 = new Siticone.UI.WinForms.SiticoneImageButton();
this.email = new Siticone.UI.WinForms.SiticoneRoundedTextBox();
this.password = new Siticone.UI.WinForms.SiticoneRoundedTextBox();
this.username = new Siticone.UI.WinForms.SiticoneRoundedTextBox();
this.license = new Siticone.UI.WinForms.SiticoneRoundedTextBox();
this.siticoneShadowForm = new Siticone.UI.WinForms.SiticoneShadowForm(this.components);
this.SuspendLayout();
//
// siticoneDragControl1
//
this.siticoneDragControl1.TargetControl = this;
//
// siticoneControlBox1
//
this.siticoneControlBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.siticoneControlBox1.BorderRadius = 10;
this.siticoneTransition1.SetDecoration(this.siticoneControlBox1, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneControlBox1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.siticoneControlBox1.HoveredState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(17)))), ((int)(((byte)(35)))));
this.siticoneControlBox1.HoveredState.IconColor = System.Drawing.Color.White;
this.siticoneControlBox1.HoveredState.Parent = this.siticoneControlBox1;
this.siticoneControlBox1.IconColor = System.Drawing.Color.White;
this.siticoneControlBox1.Location = new System.Drawing.Point(367, 5);
this.siticoneControlBox1.Margin = new System.Windows.Forms.Padding(4);
this.siticoneControlBox1.Name = "siticoneControlBox1";
this.siticoneControlBox1.ShadowDecoration.Parent = this.siticoneControlBox1;
this.siticoneControlBox1.Size = new System.Drawing.Size(60, 36);
this.siticoneControlBox1.TabIndex = 1;
this.siticoneControlBox1.Click += new System.EventHandler(this.siticoneControlBox1_Click);
//
// siticoneControlBox2
//
this.siticoneControlBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.siticoneControlBox2.BorderRadius = 10;
this.siticoneControlBox2.ControlBoxType = Siticone.UI.WinForms.Enums.ControlBoxType.MinimizeBox;
this.siticoneTransition1.SetDecoration(this.siticoneControlBox2, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneControlBox2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.siticoneControlBox2.HoveredState.Parent = this.siticoneControlBox2;
this.siticoneControlBox2.IconColor = System.Drawing.Color.White;
this.siticoneControlBox2.Location = new System.Drawing.Point(306, 5);
this.siticoneControlBox2.Margin = new System.Windows.Forms.Padding(4);
this.siticoneControlBox2.Name = "siticoneControlBox2";
this.siticoneControlBox2.ShadowDecoration.Parent = this.siticoneControlBox2;
this.siticoneControlBox2.Size = new System.Drawing.Size(60, 36);
this.siticoneControlBox2.TabIndex = 2;
//
// siticoneTransition1
//
this.siticoneTransition1.AnimationType = Siticone.UI.AnimatorNS.AnimationType.Rotate;
this.siticoneTransition1.Cursor = null;
animation2.AnimateOnlyDifferences = true;
animation2.BlindCoeff = ((System.Drawing.PointF)(resources.GetObject("animation2.BlindCoeff")));
animation2.LeafCoeff = 0F;
animation2.MaxTime = 1F;
animation2.MinTime = 0F;
animation2.MosaicCoeff = ((System.Drawing.PointF)(resources.GetObject("animation2.MosaicCoeff")));
animation2.MosaicShift = ((System.Drawing.PointF)(resources.GetObject("animation2.MosaicShift")));
animation2.MosaicSize = 0;
animation2.Padding = new System.Windows.Forms.Padding(50);
animation2.RotateCoeff = 1F;
animation2.RotateLimit = 0F;
animation2.ScaleCoeff = ((System.Drawing.PointF)(resources.GetObject("animation2.ScaleCoeff")));
animation2.SlideCoeff = ((System.Drawing.PointF)(resources.GetObject("animation2.SlideCoeff")));
animation2.TimeCoeff = 0F;
animation2.TransparencyCoeff = 1F;
this.siticoneTransition1.DefaultAnimation = animation2;
//
// label1
//
this.label1.AutoSize = true;
this.siticoneTransition1.SetDecoration(this.label1, Siticone.UI.AnimatorNS.DecorationType.None);
this.label1.Font = new System.Drawing.Font("Segoe UI Light", 10F);
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(-1, 167);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(0, 23);
this.label1.TabIndex = 22;
//
// label2
//
this.label2.AutoSize = true;
this.siticoneTransition1.SetDecoration(this.label2, Siticone.UI.AnimatorNS.DecorationType.None);
this.label2.Font = new System.Drawing.Font("Segoe UI Semibold", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.label2.Location = new System.Drawing.Point(13, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(152, 23);
this.label2.TabIndex = 27;
this.label2.Text = "Auth.GG | Register";
//
// siticoneRoundedButton1
//
this.siticoneRoundedButton1.BorderColor = System.Drawing.Color.DodgerBlue;
this.siticoneRoundedButton1.BorderThickness = 1;
this.siticoneRoundedButton1.CheckedState.Parent = this.siticoneRoundedButton1;
this.siticoneRoundedButton1.CustomImages.Parent = this.siticoneRoundedButton1;
this.siticoneTransition1.SetDecoration(this.siticoneRoundedButton1, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneRoundedButton1.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.siticoneRoundedButton1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.siticoneRoundedButton1.ForeColor = System.Drawing.Color.White;
this.siticoneRoundedButton1.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(218)))), ((int)(((byte)(223)))));
this.siticoneRoundedButton1.HoveredState.Parent = this.siticoneRoundedButton1;
this.siticoneRoundedButton1.Location = new System.Drawing.Point(46, 349);
this.siticoneRoundedButton1.Margin = new System.Windows.Forms.Padding(4);
this.siticoneRoundedButton1.Name = "siticoneRoundedButton1";
this.siticoneRoundedButton1.ShadowDecoration.Parent = this.siticoneRoundedButton1;
this.siticoneRoundedButton1.Size = new System.Drawing.Size(340, 33);
this.siticoneRoundedButton1.TabIndex = 26;
this.siticoneRoundedButton1.Text = "Back to Login";
this.siticoneRoundedButton1.Click += new System.EventHandler(this.siticoneRoundedButton1_Click);
//
// siticoneRoundedButton2
//
this.siticoneRoundedButton2.BorderColor = System.Drawing.Color.DodgerBlue;
this.siticoneRoundedButton2.BorderThickness = 1;
this.siticoneRoundedButton2.CheckedState.Parent = this.siticoneRoundedButton2;
this.siticoneRoundedButton2.CustomImages.Parent = this.siticoneRoundedButton2;
this.siticoneTransition1.SetDecoration(this.siticoneRoundedButton2, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneRoundedButton2.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.siticoneRoundedButton2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.siticoneRoundedButton2.ForeColor = System.Drawing.Color.White;
this.siticoneRoundedButton2.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(218)))), ((int)(((byte)(223)))));
this.siticoneRoundedButton2.HoveredState.Parent = this.siticoneRoundedButton2;
this.siticoneRoundedButton2.Location = new System.Drawing.Point(46, 308);
this.siticoneRoundedButton2.Margin = new System.Windows.Forms.Padding(4);
this.siticoneRoundedButton2.Name = "siticoneRoundedButton2";
this.siticoneRoundedButton2.ShadowDecoration.Parent = this.siticoneRoundedButton2;
this.siticoneRoundedButton2.Size = new System.Drawing.Size(340, 33);
this.siticoneRoundedButton2.TabIndex = 28;
this.siticoneRoundedButton2.Text = "Register";
this.siticoneRoundedButton2.Click += new System.EventHandler(this.siticoneRoundedButton2_Click);
//
// siticoneImageButton1
//
this.siticoneImageButton1.BackColor = System.Drawing.Color.Transparent;
this.siticoneImageButton1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.siticoneImageButton1.CheckedState.Parent = this.siticoneImageButton1;
this.siticoneTransition1.SetDecoration(this.siticoneImageButton1, Siticone.UI.AnimatorNS.DecorationType.None);
this.siticoneImageButton1.HoveredState.ImageSize = new System.Drawing.Size(200, 100);
this.siticoneImageButton1.HoveredState.Parent = this.siticoneImageButton1;
this.siticoneImageButton1.Image = ((System.Drawing.Image)(resources.GetObject("siticoneImageButton1.Image")));
this.siticoneImageButton1.ImageSize = new System.Drawing.Size(200, 100);
this.siticoneImageButton1.Location = new System.Drawing.Point(9, 43);
this.siticoneImageButton1.Name = "siticoneImageButton1";
this.siticoneImageButton1.PressedState.ImageSize = new System.Drawing.Size(200, 100);
this.siticoneImageButton1.PressedState.Parent = this.siticoneImageButton1;
this.siticoneImageButton1.Size = new System.Drawing.Size(406, 66);
this.siticoneImageButton1.TabIndex = 33;
//
// email
//
this.email.AllowDrop = true;
this.email.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.email.Cursor = System.Windows.Forms.Cursors.IBeam;
this.siticoneTransition1.SetDecoration(this.email, Siticone.UI.AnimatorNS.DecorationType.None);
this.email.DefaultText = "Email";
this.email.DisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))));
this.email.DisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(226)))), ((int)(((byte)(226)))));
this.email.DisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.email.DisabledState.Parent = this.email;
this.email.DisabledState.PlaceholderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.email.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.email.FocusedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.email.FocusedState.Parent = this.email;
this.email.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.email.HoveredState.Parent = this.email;
this.email.Location = new System.Drawing.Point(56, 206);
this.email.Margin = new System.Windows.Forms.Padding(5);
this.email.Name = "email";
this.email.PasswordChar = '\0';
this.email.PlaceholderText = "";
this.email.SelectedText = "";
this.email.ShadowDecoration.Parent = this.email;
this.email.Size = new System.Drawing.Size(315, 37);
this.email.TabIndex = 34;
this.email.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// password
//
this.password.AllowDrop = true;
this.password.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.password.Cursor = System.Windows.Forms.Cursors.IBeam;
this.siticoneTransition1.SetDecoration(this.password, Siticone.UI.AnimatorNS.DecorationType.None);
this.password.DefaultText = "Password";
this.password.DisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))));
this.password.DisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(226)))), ((int)(((byte)(226)))));
this.password.DisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.password.DisabledState.Parent = this.password;
this.password.DisabledState.PlaceholderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.password.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.password.FocusedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.password.FocusedState.Parent = this.password;
this.password.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.password.HoveredState.Parent = this.password;
this.password.Location = new System.Drawing.Point(56, 162);
this.password.Margin = new System.Windows.Forms.Padding(5);
this.password.Name = "password";
this.password.PasswordChar = '\0';
this.password.PlaceholderText = "";
this.password.SelectedText = "";
this.password.ShadowDecoration.Parent = this.password;
this.password.Size = new System.Drawing.Size(315, 37);
this.password.TabIndex = 35;
this.password.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// username
//
this.username.AllowDrop = true;
this.username.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.username.Cursor = System.Windows.Forms.Cursors.IBeam;
this.siticoneTransition1.SetDecoration(this.username, Siticone.UI.AnimatorNS.DecorationType.None);
this.username.DefaultText = "Username";
this.username.DisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))));
this.username.DisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(226)))), ((int)(((byte)(226)))));
this.username.DisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.username.DisabledState.Parent = this.username;
this.username.DisabledState.PlaceholderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.username.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.username.FocusedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.username.FocusedState.Parent = this.username;
this.username.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.username.HoveredState.Parent = this.username;
this.username.Location = new System.Drawing.Point(56, 116);
this.username.Margin = new System.Windows.Forms.Padding(5);
this.username.Name = "username";
this.username.PasswordChar = '\0';
this.username.PlaceholderText = "";
this.username.SelectedText = "";
this.username.ShadowDecoration.Parent = this.username;
this.username.Size = new System.Drawing.Size(315, 37);
this.username.TabIndex = 36;
this.username.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// license
//
this.license.AllowDrop = true;
this.license.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(127)))), ((int)(((byte)(243)))));
this.license.Cursor = System.Windows.Forms.Cursors.IBeam;
this.siticoneTransition1.SetDecoration(this.license, Siticone.UI.AnimatorNS.DecorationType.None);
this.license.DefaultText = "License";
this.license.DisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))));
this.license.DisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(226)))), ((int)(((byte)(226)))));
this.license.DisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.license.DisabledState.Parent = this.license;
this.license.DisabledState.PlaceholderForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138)))));
this.license.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.license.FocusedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.license.FocusedState.Parent = this.license;
this.license.HoveredState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
this.license.HoveredState.Parent = this.license;
this.license.Location = new System.Drawing.Point(56, 253);
this.license.Margin = new System.Windows.Forms.Padding(5);
this.license.Name = "license";
this.license.PasswordChar = '\0';
this.license.PlaceholderText = "";
this.license.SelectedText = "";
this.license.ShadowDecoration.Parent = this.license;
this.license.Size = new System.Drawing.Size(315, 37);
this.license.TabIndex = 37;
this.license.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// Register
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoValidate = System.Windows.Forms.AutoValidate.Disable;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(39)))), ((int)(((byte)(42)))));
this.ClientSize = new System.Drawing.Size(432, 395);
this.Controls.Add(this.license);
this.Controls.Add(this.username);
this.Controls.Add(this.password);
this.Controls.Add(this.email);
this.Controls.Add(this.siticoneImageButton1);
this.Controls.Add(this.siticoneRoundedButton2);
this.Controls.Add(this.label2);
this.Controls.Add(this.siticoneRoundedButton1);
this.Controls.Add(this.label1);
this.Controls.Add(this.siticoneControlBox2);
this.Controls.Add(this.siticoneControlBox1);
this.siticoneTransition1.SetDecoration(this, Siticone.UI.AnimatorNS.DecorationType.BottomMirror);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "Register";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Auth.GG WInform";
this.TransparencyKey = System.Drawing.Color.Maroon;
this.ResumeLayout(false);
this.PerformLayout();
}
// Token: 0x04000001 RID: 1
private global::System.ComponentModel.IContainer components = null;
// Token: 0x04000002 RID: 2
private global::Siticone.UI.WinForms.SiticoneDragControl siticoneDragControl1;
// Token: 0x04000004 RID: 4
private global::Siticone.UI.WinForms.SiticoneControlBox siticoneControlBox1;
// Token: 0x04000005 RID: 5
private global::Siticone.UI.WinForms.SiticoneControlBox siticoneControlBox2;
// Token: 0x04000009 RID: 9
private global::Siticone.UI.WinForms.SiticoneTransition siticoneTransition1;
// Token: 0x0400000A RID: 10
private global::System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private Siticone.UI.WinForms.SiticoneRoundedButton siticoneRoundedButton1;
private Siticone.UI.WinForms.SiticoneShadowForm siticoneShadowForm;
private Siticone.UI.WinForms.SiticoneRoundedButton siticoneRoundedButton2;
private Siticone.UI.WinForms.SiticoneImageButton siticoneImageButton1;
private Siticone.UI.WinForms.SiticoneRoundedTextBox license;
private Siticone.UI.WinForms.SiticoneRoundedTextBox username;
private Siticone.UI.WinForms.SiticoneRoundedTextBox password;
private Siticone.UI.WinForms.SiticoneRoundedTextBox email;
}
}```
Make sure that Siticone Library is present in your project (in bin folder) and the library is referenced "using Siticone..."
There is a newer version Siticone.Desktop.UI 2.0.04, use that one.
I extended a DataGridView but unfortunately, after using a template from Toolbox, it generates default parameters for me. It looks like it overrides my settings. What im doing wrong here?
class CustomDataGrid2 : DataGridView
{
public CustomDataGrid2() : base()
{
base.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
base.ColumnHeadersHeight = 23;
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
base.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
base.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle1.Alignment = DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.ControlDark;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
base.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
base.EnableHeadersVisualStyles = false;
base.Location = new System.Drawing.Point(112, 186);
base.RowHeadersVisible = false;
base.Size = new System.Drawing.Size(401, 150);
}
}
Result:
//
// customDataGrid21
//
this.customDataGrid21.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.customDataGrid21.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.ControlDark;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.customDataGrid21.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.customDataGrid21.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.customDataGrid21.EnableHeadersVisualStyles = false;
this.customDataGrid21.Location = new System.Drawing.Point(60, 138);
this.customDataGrid21.Name = "customDataGrid1";
this.customDataGrid21.RowHeadersVisible = false;
this.customDataGrid21.Size = new System.Drawing.Size(401, 150);
this.customDataGrid21.TabIndex = 3;
As you can see I set DataGridViewColumnHeadersHeightSizeMode.DisableResizing but it generated AutoSize
I also tried:
class CustomDataGrid4 : DataGridView
{
public CustomDataGrid4() : base()
{
}
protected override void OnLayout(LayoutEventArgs e)
{
base.OnLayout(e);
base.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
base.ColumnHeadersHeight = 23;
}
}
Result:
//
// customDataGrid41
//
this.customDataGrid41.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.customDataGrid41.Location = new System.Drawing.Point(96, 152);
this.customDataGrid41.Name = "customDataGrid41";
this.customDataGrid41.Size = new System.Drawing.Size(240, 150);
this.customDataGrid41.TabIndex = 3;
Solution:
class CustomDataGrid6 : DataGridView
{
private DataGridViewColumnHeadersHeightSizeMode m_ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
private int m_columnHeadersHeight = 23;
public new DataGridViewColumnHeadersHeightSizeMode ColumnHeadersHeightSizeMode
{
get => this.m_ColumnHeadersHeightSizeMode;
set
{
this.m_ColumnHeadersHeightSizeMode = value;
base.ColumnHeadersHeightSizeMode = this.m_ColumnHeadersHeightSizeMode;
}
}
public int ColumnHeadersHeight
{
get => this.m_columnHeadersHeight;
set
{
this.m_columnHeadersHeight = value;
base.ColumnHeadersHeight = this.m_columnHeadersHeight;
}
}
}
Set the property in the overridden OnLayout() method:
MSDN: Derived classes should override this method to do any custom layout
logic.
private DataGridViewColumnHeadersHeightSizeMode m_ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
public CustomDGV() { }
protected override void OnLayout(LayoutEventArgs e)
{
base.OnLayout(e);
base.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
}
public new DataGridViewColumnHeadersHeightSizeMode ColumnHeadersHeightSizeMode
{
get => this.m_ColumnHeadersHeightSizeMode;
set { this.m_ColumnHeadersHeightSizeMode = value;
base.ColumnHeadersHeightSizeMode = this.m_ColumnHeadersHeightSizeMode;
}
}
When you will drop the Custom Control on a Form, DataGridViewColumnHeadersHeightSizeMode.DisableResizing will be the applied value for ColumnHeadersHeightSizeMode
Try it with a Label.AutoSize property. Autosize = false will be set in the Designer only when set in the OnLayout() method.
I have a simple form with some text box, label, and buttons, the problem is that it throws attempted to read or write protected memory every time I resize the window, there are no background tasks or nothing running when the form is showing, there is no code done yet, I just designed the UI and when I resize this error comes up. any ideas as to why this is? like I said, there is no code done yet, just dragged and dropped controls and arranged them.
this is the code in the .Designer
namespace MyProject
{
partial class frmMain
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.dgvMain = new System.Windows.Forms.DataGridView();
this.btnAbout = new System.Windows.Forms.Button();
this.gbFilters = new System.Windows.Forms.GroupBox();
this.cbFiltered = new System.Windows.Forms.ComboBox();
this.cbDomain = new System.Windows.Forms.CheckBox();
this.cbUser = new System.Windows.Forms.CheckBox();
this.btnNewPsswd = new System.Windows.Forms.Button();
this.btnLogOut = new System.Windows.Forms.Button();
this.lblUsr = new System.Windows.Forms.Label();
this.txtUsr = new System.Windows.Forms.TextBox();
this.lblPassword = new System.Windows.Forms.Label();
this.txtPassword = new System.Windows.Forms.TextBox();
this.cbShow = new System.Windows.Forms.CheckBox();
this.lblDomain = new System.Windows.Forms.Label();
this.txtDomain = new System.Windows.Forms.TextBox();
this.lblUrl = new System.Windows.Forms.Label();
this.txtUrl = new System.Windows.Forms.TextBox();
this.lblNotes = new System.Windows.Forms.Label();
this.txtNotes = new System.Windows.Forms.TextBox();
this.btnDelete = new System.Windows.Forms.Button();
this.gbMain = new System.Windows.Forms.GroupBox();
this.btnEdit = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dgvMain)).BeginInit();
this.gbFilters.SuspendLayout();
this.gbMain.SuspendLayout();
this.SuspendLayout();
//
// dgvMain
//
this.dgvMain.AllowUserToAddRows = false;
this.dgvMain.AllowUserToDeleteRows = false;
this.dgvMain.BackgroundColor = System.Drawing.Color.White;
this.dgvMain.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dgvMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvMain.GridColor = System.Drawing.Color.White;
this.dgvMain.Location = new System.Drawing.Point(12, 96);
this.dgvMain.Name = "dgvMain";
this.dgvMain.ReadOnly = true;
this.dgvMain.Size = new System.Drawing.Size(544, 331);
this.dgvMain.TabIndex = 1;
//
// btnAbout
//
this.btnAbout.BackColor = System.Drawing.Color.RoyalBlue;
this.btnAbout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAbout.ForeColor = System.Drawing.Color.White;
this.btnAbout.Image = global::PasswordSavvy.Properties.Resources.info;
this.btnAbout.Location = new System.Drawing.Point(12, 433);
this.btnAbout.Name = "btnAbout";
this.btnAbout.Size = new System.Drawing.Size(48, 55);
this.btnAbout.TabIndex = 3;
this.btnAbout.UseVisualStyleBackColor = false;
//
// gbFilters
//
this.gbFilters.BackColor = System.Drawing.Color.Transparent;
this.gbFilters.Controls.Add(this.cbFiltered);
this.gbFilters.Controls.Add(this.cbDomain);
this.gbFilters.Controls.Add(this.cbUser);
this.gbFilters.Location = new System.Drawing.Point(12, 13);
this.gbFilters.Name = "gbFilters";
this.gbFilters.Size = new System.Drawing.Size(544, 77);
this.gbFilters.TabIndex = 3;
this.gbFilters.TabStop = false;
this.gbFilters.Text = "Filters";
//
// cbFiltered
//
this.cbFiltered.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbFiltered.FormattingEnabled = true;
this.cbFiltered.Location = new System.Drawing.Point(243, 21);
this.cbFiltered.Name = "cbFiltered";
this.cbFiltered.Size = new System.Drawing.Size(217, 24);
this.cbFiltered.TabIndex = 2;
//
// cbDomain
//
this.cbDomain.AutoSize = true;
this.cbDomain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbDomain.Location = new System.Drawing.Point(106, 44);
this.cbDomain.Name = "cbDomain";
this.cbDomain.Size = new System.Drawing.Size(71, 20);
this.cbDomain.TabIndex = 1;
this.cbDomain.Text = "Domain";
this.cbDomain.UseVisualStyleBackColor = true;
//
// cbUser
//
this.cbUser.AutoSize = true;
this.cbUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbUser.Location = new System.Drawing.Point(106, 18);
this.cbUser.Name = "cbUser";
this.cbUser.Size = new System.Drawing.Size(53, 20);
this.cbUser.TabIndex = 0;
this.cbUser.Text = "User";
this.cbUser.UseVisualStyleBackColor = true;
//
// btnNewPsswd
//
this.btnNewPsswd.BackColor = System.Drawing.Color.SeaGreen;
this.btnNewPsswd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNewPsswd.ForeColor = System.Drawing.Color.White;
this.btnNewPsswd.Location = new System.Drawing.Point(314, 433);
this.btnNewPsswd.Name = "btnNewPsswd";
this.btnNewPsswd.Size = new System.Drawing.Size(242, 55);
this.btnNewPsswd.TabIndex = 5;
this.btnNewPsswd.Text = "New Password";
this.btnNewPsswd.UseVisualStyleBackColor = false;
this.btnNewPsswd.Click += new System.EventHandler(this.btnNewPsswd_Click);
//
// btnLogOut
//
this.btnLogOut.BackColor = System.Drawing.Color.RoyalBlue;
this.btnLogOut.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnLogOut.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLogOut.ForeColor = System.Drawing.Color.White;
this.btnLogOut.Location = new System.Drawing.Point(66, 433);
this.btnLogOut.Name = "btnLogOut";
this.btnLogOut.Size = new System.Drawing.Size(242, 55);
this.btnLogOut.TabIndex = 4;
this.btnLogOut.Text = "Log Out";
this.btnLogOut.UseVisualStyleBackColor = false;
this.btnLogOut.Click += new System.EventHandler(this.btnLogOut_Click);
//
// lblUsr
//
this.lblUsr.AutoSize = true;
this.lblUsr.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblUsr.Location = new System.Drawing.Point(14, 25);
this.lblUsr.Margin = new System.Windows.Forms.Padding(3, 6, 3, 3);
this.lblUsr.Name = "lblUsr";
this.lblUsr.Size = new System.Drawing.Size(37, 16);
this.lblUsr.TabIndex = 2;
this.lblUsr.Text = "User";
//
// txtUsr
//
this.txtUsr.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtUsr.Location = new System.Drawing.Point(14, 47);
this.txtUsr.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6);
this.txtUsr.MaxLength = 20;
this.txtUsr.Name = "txtUsr";
this.txtUsr.ReadOnly = true;
this.txtUsr.Size = new System.Drawing.Size(297, 22);
this.txtUsr.TabIndex = 6;
//
// lblPassword
//
this.lblPassword.AutoSize = true;
this.lblPassword.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblPassword.Location = new System.Drawing.Point(14, 81);
this.lblPassword.Margin = new System.Windows.Forms.Padding(3, 6, 3, 3);
this.lblPassword.Name = "lblPassword";
this.lblPassword.Size = new System.Drawing.Size(68, 16);
this.lblPassword.TabIndex = 4;
this.lblPassword.Text = "Password";
//
// txtPassword
//
this.txtPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtPassword.Location = new System.Drawing.Point(14, 103);
this.txtPassword.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6);
this.txtPassword.MaxLength = 50;
this.txtPassword.Name = "txtPassword";
this.txtPassword.ReadOnly = true;
this.txtPassword.Size = new System.Drawing.Size(297, 22);
this.txtPassword.TabIndex = 7;
this.txtPassword.UseSystemPasswordChar = true;
//
// cbShow
//
this.cbShow.AutoSize = true;
this.cbShow.BackColor = System.Drawing.Color.Transparent;
this.cbShow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbShow.ForeColor = System.Drawing.Color.Goldenrod;
this.cbShow.Location = new System.Drawing.Point(17, 134);
this.cbShow.Name = "cbShow";
this.cbShow.Size = new System.Drawing.Size(60, 20);
this.cbShow.TabIndex = 8;
this.cbShow.Text = "Show ";
this.cbShow.UseVisualStyleBackColor = false;
this.cbShow.CheckStateChanged += new System.EventHandler(this.cbShow_CheckStateChanged);
//
// lblDomain
//
this.lblDomain.AutoSize = true;
this.lblDomain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblDomain.Location = new System.Drawing.Point(14, 163);
this.lblDomain.Margin = new System.Windows.Forms.Padding(3, 6, 3, 3);
this.lblDomain.Name = "lblDomain";
this.lblDomain.Size = new System.Drawing.Size(55, 16);
this.lblDomain.TabIndex = 7;
this.lblDomain.Text = "Domain";
//
// txtDomain
//
this.txtDomain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtDomain.Location = new System.Drawing.Point(14, 185);
this.txtDomain.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6);
this.txtDomain.MaxLength = 50;
this.txtDomain.Name = "txtDomain";
this.txtDomain.ReadOnly = true;
this.txtDomain.Size = new System.Drawing.Size(297, 22);
this.txtDomain.TabIndex = 9;
//
// lblUrl
//
this.lblUrl.AutoSize = true;
this.lblUrl.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblUrl.Location = new System.Drawing.Point(14, 219);
this.lblUrl.Margin = new System.Windows.Forms.Padding(3, 6, 3, 3);
this.lblUrl.Name = "lblUrl";
this.lblUrl.Size = new System.Drawing.Size(35, 16);
this.lblUrl.TabIndex = 9;
this.lblUrl.Text = "URL";
//
// txtUrl
//
this.txtUrl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtUrl.Location = new System.Drawing.Point(14, 241);
this.txtUrl.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6);
this.txtUrl.MaxLength = 255;
this.txtUrl.Name = "txtUrl";
this.txtUrl.ReadOnly = true;
this.txtUrl.Size = new System.Drawing.Size(297, 22);
this.txtUrl.TabIndex = 10;
//
// lblNotes
//
this.lblNotes.AutoSize = true;
this.lblNotes.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblNotes.Location = new System.Drawing.Point(14, 275);
this.lblNotes.Margin = new System.Windows.Forms.Padding(3, 6, 3, 3);
this.lblNotes.Name = "lblNotes";
this.lblNotes.Size = new System.Drawing.Size(44, 16);
this.lblNotes.TabIndex = 11;
this.lblNotes.Text = "Notes";
//
// txtNotes
//
this.txtNotes.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtNotes.Location = new System.Drawing.Point(14, 297);
this.txtNotes.Margin = new System.Windows.Forms.Padding(3, 3, 3, 6);
this.txtNotes.MaxLength = 255;
this.txtNotes.Multiline = true;
this.txtNotes.Name = "txtNotes";
this.txtNotes.ReadOnly = true;
this.txtNotes.Size = new System.Drawing.Size(297, 126);
this.txtNotes.TabIndex = 11;
//
// btnDelete
//
this.btnDelete.BackColor = System.Drawing.Color.Firebrick;
this.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDelete.ForeColor = System.Drawing.Color.White;
this.btnDelete.Location = new System.Drawing.Point(202, 432);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(119, 36);
this.btnDelete.TabIndex = 13;
this.btnDelete.Text = "Delete";
this.btnDelete.UseVisualStyleBackColor = false;
//
// gbMain
//
this.gbMain.BackColor = System.Drawing.Color.Transparent;
this.gbMain.Controls.Add(this.btnEdit);
this.gbMain.Controls.Add(this.btnDelete);
this.gbMain.Controls.Add(this.txtNotes);
this.gbMain.Controls.Add(this.lblNotes);
this.gbMain.Controls.Add(this.txtUrl);
this.gbMain.Controls.Add(this.lblUrl);
this.gbMain.Controls.Add(this.txtDomain);
this.gbMain.Controls.Add(this.lblDomain);
this.gbMain.Controls.Add(this.cbShow);
this.gbMain.Controls.Add(this.txtPassword);
this.gbMain.Controls.Add(this.lblPassword);
this.gbMain.Controls.Add(this.txtUsr);
this.gbMain.Controls.Add(this.lblUsr);
this.gbMain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.gbMain.Location = new System.Drawing.Point(563, 13);
this.gbMain.Margin = new System.Windows.Forms.Padding(4);
this.gbMain.Name = "gbMain";
this.gbMain.Padding = new System.Windows.Forms.Padding(4);
this.gbMain.Size = new System.Drawing.Size(328, 475);
this.gbMain.TabIndex = 0;
this.gbMain.TabStop = false;
this.gbMain.Text = "groupBox1";
//
// btnEdit
//
this.btnEdit.BackColor = System.Drawing.Color.RoyalBlue;
this.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnEdit.ForeColor = System.Drawing.Color.White;
this.btnEdit.Location = new System.Drawing.Point(77, 432);
this.btnEdit.Name = "btnEdit";
this.btnEdit.Size = new System.Drawing.Size(119, 36);
this.btnEdit.TabIndex = 12;
this.btnEdit.Text = "Edit";
this.btnEdit.UseVisualStyleBackColor = false;
//
// frmMain
//
this.AcceptButton = this.btnNewPsswd;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnLogOut;
this.ClientSize = new System.Drawing.Size(904, 497);
this.Controls.Add(this.btnLogOut);
this.Controls.Add(this.btnNewPsswd);
this.Controls.Add(this.gbFilters);
this.Controls.Add(this.btnAbout);
this.Controls.Add(this.dgvMain);
this.Controls.Add(this.gbMain);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Password Savvy";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.frmMain_FormClosed);
this.Load += new System.EventHandler(this.frmMain_Load);
((System.ComponentModel.ISupportInitialize)(this.dgvMain)).EndInit();
this.gbFilters.ResumeLayout(false);
this.gbFilters.PerformLayout();
this.gbMain.ResumeLayout(false);
this.gbMain.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView dgvMain;
private System.Windows.Forms.Button btnAbout;
private System.Windows.Forms.GroupBox gbFilters;
private System.Windows.Forms.Button btnNewPsswd;
private System.Windows.Forms.Button btnLogOut;
private System.Windows.Forms.CheckBox cbUser;
private System.Windows.Forms.ComboBox cbFiltered;
private System.Windows.Forms.CheckBox cbDomain;
private System.Windows.Forms.Label lblUsr;
private System.Windows.Forms.TextBox txtUsr;
private System.Windows.Forms.Label lblPassword;
private System.Windows.Forms.TextBox txtPassword;
private System.Windows.Forms.CheckBox cbShow;
private System.Windows.Forms.Label lblDomain;
private System.Windows.Forms.TextBox txtDomain;
private System.Windows.Forms.Label lblUrl;
private System.Windows.Forms.TextBox txtUrl;
private System.Windows.Forms.Label lblNotes;
private System.Windows.Forms.TextBox txtNotes;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.GroupBox gbMain;
private System.Windows.Forms.Button btnEdit;
}
}
all controls in the form are drag and drop
This is almost certainly not a bug in WinForms or your C# code. These errors are caused by either P/Invoke gone wrong or native modules loaded into your process. The native modules could be loaded by you explicitly, or could be the result of AppInit DLLs or DLL's loaded by drivers or other processes.
Enable Managed Debugging Assistants and update your video card drivers. Check Autoruns and the loaded Modules tab of VS for unexpected dlls. Process Explorer is another good tool to identify third party modules.
VectorLayer v = new VectorLayer("Point", new PostGIS("server=localhost;port=5433;user=postgres;pwd=9839757437;database=OSM3", "GhanaRegions", "Geometry", "id"));
VectorLayer v1 = new VectorLayer("Point", new PostGIS("server=localhost;port=5433;user=postgres;pwd=9839757437;database=OSM3", "ghanalocation", "geometry", "id"));
v.Style.EnableOutline = true;
v.Style.Outline = Pens.Black;
v.Style.Fill = Brushes.Red;
v1.Style.PointColor = Brushes.White;
SharpMap.Layers.LabelLayer layLabel = new SharpMap.Layers.LabelLayer("Name");
layLabel.DataSource = new PostGIS("server=localhost;port=5433;user=postgres;pwd=9839757437;database=OSM3", "citie33", "geometry", "id");
layLabel.Enabled = true;
layLabel.LabelColumn = "Name";
layLabel.MaxVisible = 2;
layLabel.MaxVisible = 190;
layLabel.MinVisible = 130;
layLabel.MultipartGeometryBehaviour = SharpMap.Layers.LabelLayer.MultipartGeometryBehaviourEnum.Largest;
layLabel.LabelFilter = SharpMap.Rendering.LabelCollisionDetection.ThoroughCollisionDetection;
layLabel.PriorityColumn = "id";
layLabel.Style.ForeColor = Color.Beige;
layLabel.Style.Font = new Font(FontFamily.GenericSerif, 12);
layLabel.Style.BackColor = new System.Drawing.SolidBrush(Color.FromArgb(128, 255, 0, 0));
layLabel.Style.HorizontalAlignment = SharpMap.Styles.LabelStyle.HorizontalAlignmentEnum.Center;
// map.Layers.Add(v1);
map.Layers.Add(v);
layLabel.Style.CollisionDetection = true;
map.ZoomToExtents();
pictureBox1.Image = map.GetMap();