Web Site

 Themes

Keep ASTreeView free, keep ASTreeView update. Please make a donation to support the development.
  • English
  • 中文
Common Assembly Version: 1.1.5.0
ASTreeView supports themes, developers may create themes and switching themes on the fly, check out the demo code below.
CONSOLE
cs code
        protected override void OnPreRender( EventArgs e )
        {
            base.OnPreRender( e );

            //link the css file
            this.lASTreeViewThemeCssFile.Text = "<link id='astreeviewcssfile' href='' type='text/css' rel='stylesheet' />";

            string script = string.Format( "document.getElementById('astreeviewcssfile').href='{0}'", this.astvMyTree.ThemeCssFile );
            ScriptManager sm = ScriptManager.GetCurrent( this.Page );
            if( sm != null && sm.EnablePartialRendering )
                ScriptManager.RegisterStartupScript( this, this.GetType(), "js" + Guid.NewGuid().ToString(), script, true );
            else
                this.ClientScript.RegisterStartupScript( this.GetType(), "js" + Guid.NewGuid().ToString(), script, true );

        }

        protected void btnRightLeft_Click( object sender, EventArgs e )
        {
            ASTreeViewTheme rightLeft = new ASTreeViewTheme();
            rightLeft.BasePath = "~/javascript/astreeview/themes/right-left/";
            rightLeft.CssFile = "right-left.css";
            this.astvMyTree.Theme = rightLeft;
            this.astvMyTree.EnableTreeLines = true;
            this.astvMyTree.EnableRightToLeftRender = true;
        }

        protected void btnThemeMacOS_Click( object sender, EventArgs e )
        {
            ASTreeViewTheme macOS = new ASTreeViewTheme();
            macOS.BasePath = "~/javascript/astreeview/themes/macOS/";
            macOS.CssFile = "macOS.css";
            this.astvMyTree.Theme = macOS;
            this.astvMyTree.EnableTreeLines = false;
            this.astvMyTree.EnableRightToLeftRender = false;
        }
 


Dear friend,

    ASTreeView license has been updated, please visit the License & Pricing page for detial. Thank you.