Example #1
0
        private void cbWhat_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            SvgGraphics ig;

            ig = new SvgGraphics();
            Render(ig);

            string s = ig.WriteSVGString();

            tbSVG.Text = s;

            StreamWriter tw = new StreamWriter("c:\\temp\\foo.svg", false);

            tw.Write(s);

            tw.Close();

            svgCtl.SRC = "c:\\temp\\foo.svg";

            this.panel1.Invalidate();
        }
Example #2
0
        private void cbWhat_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            SvgGraphics ig;

            ig = new SvgGraphics();
            Render(ig);

            string s = ig.WriteSVGString();

            tbSVG.Text = s;

            string tempFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "foo.svg");

            StreamWriter tw = new StreamWriter(tempFile, false);

            tw.Write(s);

            tw.Close();

            svgCtl.Navigate(new Uri(tempFile));
            svgCtl.Refresh(WebBrowserRefreshOption.Completely);

            this.panel1.Invalidate();
        }