Aspose.Cells.GridWeb.Examples.CSharp.GridWebBasics.ApplyCustomPresetStyle.btnSaveCustomStyle_Click C# (CSharp) Метод

btnSaveCustomStyle_Click() защищенный Метод

protected btnSaveCustomStyle_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        protected void btnSaveCustomStyle_Click(object sender, EventArgs e)
        {
            // ExStart:SaveCustomStyle
            // Setting header bar properties, BackColor, ForeColor, Font & BorderWidth
            GridWeb1.HeaderBarStyle.BackColor = System.Drawing.Color.Brown;
            GridWeb1.HeaderBarStyle.ForeColor = System.Drawing.Color.Yellow;
            GridWeb1.HeaderBarStyle.Font.Bold = true;
            GridWeb1.HeaderBarStyle.Font.Name = "Century Gothic";
            GridWeb1.HeaderBarStyle.BorderWidth = new Unit(2, UnitType.Point);

            // Setting Tab properties, BackColor, ForeColor
            GridWeb1.TabStyle.BackColor = System.Drawing.Color.Yellow;
            GridWeb1.TabStyle.ForeColor = System.Drawing.Color.Blue;

            // Setting Active Tab properties, BackColor, ForeColor
            GridWeb1.ActiveTabStyle.BackColor = System.Drawing.Color.Blue;
            GridWeb1.ActiveTabStyle.ForeColor = System.Drawing.Color.Yellow;

            // Saving style information to an XML file
            GridWeb1.SaveCustomStyleFile((this.Master as Site).GetDataDir() + "\\GridWebBasics\\CustomPresetStyle_out.xml");
            // ExEnd:SaveCustomStyle

            lblMessage.Text = "Custom style xml file saved successfully at Data/GridWebBasics/CustomPresetStyle_out.xml";
        }