Example #1
0
        internal static string WpfObjToXaml(object wpfObject, bool includeRuntime)
        {
            XmlXamlWriter writer = new XmlXamlWriter(new WpfDrawingSettings {
                IncludeRuntime = includeRuntime
            });

            return(writer.Save(wpfObject));
        }
Example #2
0
        public void Handwheel2() //integrated conversion, manual writing
        {
            var           drawing = SvgConverter.ConverterLogic.SvgFileToWpfObject("TestFiles\\Handwheel.svg", null);
            XmlXamlWriter writer  = new XmlXamlWriter(null);
            var           xaml    = writer.Save(drawing);

            CheckXamlOutput(xaml);
        }
Example #3
0
        public void Handwheel2() //integrated conversion, manual writing
        {
            var           drawing = SvgConverter.ConverterLogic.SvgFileToWpfObject("TestFiles\\Handwheel.svg", null);
            XmlXamlWriter writer  = new XmlXamlWriter(null);
            var           xaml    = writer.Save(drawing);

            Console.WriteLine(xaml);
            Clipboard.SetText(xaml);
        }
Example #4
0
        public void Handwheel1() //pure svg# without any modifications
        {
            var           fileReader = new FileSvgReader(null);
            DrawingGroup  drawing    = fileReader.Read("TestFiles\\Handwheel.svg");
            XmlXamlWriter writer     = new XmlXamlWriter(null);
            var           xaml       = writer.Save(drawing);

            CheckXamlOutput(xaml);
        }
Example #5
0
        public void Handwheel1() //pure svg# without any modifications
        {
            var           fileReader = new FileSvgReader(null);
            DrawingGroup  drawing    = fileReader.Read("TestFiles\\Handwheel.svg");
            XmlXamlWriter writer     = new XmlXamlWriter(null);
            var           xaml       = writer.Save(drawing);

            Console.WriteLine(xaml);
            Clipboard.SetText(xaml);
        }