Click here to Skip to main content
15,916,432 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: silverlight and dlls Pin
Mark Salsbery30-Mar-09 6:06
Mark Salsbery30-Mar-09 6:06 
QuestionWhat is the Exact use of WF??? Pin
Narendra Reddy Vajrala24-Mar-09 2:18
Narendra Reddy Vajrala24-Mar-09 2:18 
AnswerRe: What is the Exact use of WF??? Pin
#realJSOP24-Mar-09 2:58
professional#realJSOP24-Mar-09 2:58 
GeneralRe: What is the Exact use of WF??? Pin
Kevin McFarlane24-Mar-09 5:30
Kevin McFarlane24-Mar-09 5:30 
GeneralRe: What is the Exact use of WF??? Pin
#realJSOP24-Mar-09 6:14
professional#realJSOP24-Mar-09 6:14 
GeneralRe: What is the Exact use of WF??? Pin
Mark Salsbery24-Mar-09 6:29
Mark Salsbery24-Mar-09 6:29 
GeneralRe: What is the Exact use of WF??? Pin
#realJSOP24-Mar-09 9:51
professional#realJSOP24-Mar-09 9:51 
GeneralRe: What is the Exact use of WF??? Pin
Kevin McFarlane24-Mar-09 6:49
Kevin McFarlane24-Mar-09 6:49 
AnswerRe: What is the Exact use of WF??? Pin
Kevin McFarlane24-Mar-09 7:08
Kevin McFarlane24-Mar-09 7:08 
AnswerRe: What is the Exact use of WF??? Pin
snowwolfchicago27-Mar-09 13:11
snowwolfchicago27-Mar-09 13:11 
GeneralRe: What is the Exact use of WF??? Pin
Narendra Reddy Vajrala30-Mar-09 5:39
Narendra Reddy Vajrala30-Mar-09 5:39 
QuestionWPF Setup Pin
GomathiR24-Mar-09 1:21
GomathiR24-Mar-09 1:21 
AnswerRe: WPF Setup Pin
Pete O'Hanlon24-Mar-09 1:28
mvePete O'Hanlon24-Mar-09 1:28 
GeneralRe: WPF Setup Pin
GomathiR24-Mar-09 19:18
GomathiR24-Mar-09 19:18 
GeneralRe: WPF Setup Pin
Pete O'Hanlon25-Mar-09 22:43
mvePete O'Hanlon25-Mar-09 22:43 
AnswerRe: WPF Setup Pin
Michael Bookatz24-Mar-09 5:32
Michael Bookatz24-Mar-09 5:32 
AnswerRe: WPF Setup Pin
ramz_g25-Mar-09 20:33
ramz_g25-Mar-09 20:33 
Questionproblem in scroll Pin
amer shammout24-Mar-09 0:40
amer shammout24-Mar-09 0:40 
QuestionXmlWriter Pin
Ranger4923-Mar-09 22:28
Ranger4923-Mar-09 22:28 
AnswerRe: XmlWriter Pin
Ranger4923-Mar-09 23:42
Ranger4923-Mar-09 23:42 
GeneralRe: XmlWriter Pin
Ranger4924-Mar-09 4:02
Ranger4924-Mar-09 4:02 
using System;<br />
using System.Text;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Xml.Linq;<br />
using System.Xml;<br />
using System.Net;<br />
using System.Windows;<br />
using System.Windows.Controls;<br />
using System.Windows.Documents;<br />
using System.Windows.Input;<br />
using System.Windows.Media;<br />
using System.Windows.Media.Animation;<br />
using System.Windows.Shapes;<br />
using System.IO;<br />
<br />
namespace LinqToXmlSilverlight090322<br />
{<br />
    public partial class Page : UserControl<br />
    {<br />
        public Page()<br />
        {<br />
            InitializeComponent();<br />
<br />
            StringBuilder sb = new StringBuilder("test.xml", 10);<br />
            XmlWriterSettings xws = new XmlWriterSettings();<br />
            xws.OmitXmlDeclaration = true;<br />
            xws.Indent = true;<br />
<br />
            using (XmlWriter xw = XmlWriter.Create(sb, xws))<br />
            {<br />
<br />
                XDocument xd = new XDocument(<br />
                    new XElement("MyFractals",<br />
                        new XElement("first",<br />
                            new XAttribute("range", "1,5"),<br />
                            new XAttribute("startRe", "1,0"),<br />
                            new XAttribute("startIm", "-0,7"),<br />
                            new XAttribute("startColor", "100")<br />
                    ),<br />
                    new XElement("second",<br />
                            new XAttribute("range", "0,5"),<br />
                            new XAttribute("startRe", "0,105"),<br />
                            new XAttribute("startIm", "-0,6"),<br />
                            new XAttribute("startColor", "160")<br />
                    ),<br />
                    new XElement("third",<br />
                            new XAttribute("range", "0,75"),<br />
                            new XAttribute("startRe", "0,5"),<br />
                            new XAttribute("startIm", "0,204"),<br />
                            new XAttribute("startColor", "60")<br />
                            )<br />
                    )<br />
                );<br />
<br />
                xd.Save(xw);<br />
            }<br />
<br />
            using (XmlReader reader = XmlReader.Create(new StringReader(sb.ToString())))<br />
            {<br />
                XDocument xd2 = XDocument.Load(reader);<br />
                XElement rt = xd2.Element(XName.Get("MyFractals"));<br />
                        var xyz = from e in rt.Elements()<br />
                        select e;<br />
                //foreach (XElement x in xyz)<br />
            }<br />
        }<br />
    }<br />
}


Why doesn't this work? There is no test.xml file created and when the program tries to open the xml file (which I manually placed) I get an error message saying 'line 1 character 1 illegal character'.
Is there anybody who could tell me how to get this to work?
Thanks,
Ranger.
GeneralRe: XmlWriter Pin
Mark Salsbery24-Mar-09 6:17
Mark Salsbery24-Mar-09 6:17 
GeneralRe: XmlWriter Pin
Ranger4924-Mar-09 6:22
Ranger4924-Mar-09 6:22 
GeneralRe: XmlWriter Pin
Mark Salsbery24-Mar-09 6:34
Mark Salsbery24-Mar-09 6:34 
GeneralRe: XmlWriter Pin
Ranger4924-Mar-09 6:41
Ranger4924-Mar-09 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.