Click here to Skip to main content
15,181,010 members
Home / Discussions / WPF
   

WPF

 
QuestionVisual Studio 2008/Expression Blend Wierdness [SOLVED!!!] Pin
BlitzPackage14-Apr-09 8:23
MemberBlitzPackage14-Apr-09 8:23 
AnswerRe: Visual Studio 2008/Expression Blend Wierdness Pin
BlitzPackage14-Apr-09 8:53
MemberBlitzPackage14-Apr-09 8:53 
QuestionCanvas or Grid inside Viewport3D? Pin
emptythetill14-Apr-09 6:38
Memberemptythetill14-Apr-09 6:38 
AnswerRe: Canvas or Grid inside Viewport3D? Pin
sivaddrahcir20-Apr-09 9:17
Membersivaddrahcir20-Apr-09 9:17 
QuestionReading a XML file from IsolatedStorage ? [modified] Pin
Mohammad Dayyan13-Apr-09 19:00
MemberMohammad Dayyan13-Apr-09 19:00 
QuestionRe: Reading a XML file from IsolatedStorage ? Pin
Mark Salsbery13-Apr-09 21:08
MemberMark Salsbery13-Apr-09 21:08 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan13-Apr-09 22:53
MemberMohammad Dayyan13-Apr-09 22:53 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan13-Apr-09 23:34
MemberMohammad Dayyan13-Apr-09 23:34 
I've done it :

using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
{
	   .
       .
       .
   
    string SettingFilePath = "CodeColorizer\\setting.xml";
    using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream(SettingFilePath, FileMode.Open, isoStore))
	{
        isoStream.Position = 0;
        XmlReader xmlReader;
        xmlReader = XmlReader.Create(isoStream);
        Debug.WriteLine("\r\n" + isoStream);
        //Moves the reader to the root element.                        
        xmlReader.MoveToContent();
        string value;
        while (xmlReader.Read())
        {
            switch (xmlReader.NodeType)
            {
                case XmlNodeType.Element:
                    {
                        if (xmlReader.Name == "IsVB")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            if (value == "True") { this.IsVB.IsChecked = true; this.IsCsharp.IsChecked = false; }
                            else if (value == "False") { this.IsVB.IsChecked = false; this.IsCsharp.IsChecked = true; }
                        }
                        else if (xmlReader.Name == "IsCsharp")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            if (value == "True") { this.IsVB.IsChecked = false; this.IsCsharp.IsChecked = true; }
                            else if (value == "False") { this.IsVB.IsChecked = true; this.IsCsharp.IsChecked = false; }
                        }
                        else if (xmlReader.Name == "IsStriped")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            if (value == "True") { this.IsStriped.IsChecked = true; }
                            else if (value == "False") { this.IsStriped.IsChecked = false; }
                        }
                        else if (xmlReader.Name == "HasLineNumber")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            if (value == "True") { this.HasLineNumber.IsChecked = true; }
                            else if (value == "False") { this.HasLineNumber.IsChecked = false; }
                        }
                        else if (xmlReader.Name == "AddDefaultStylesWithinPreTags")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            if (value == "True") { this.addDefaultStylesWithinPreTags.IsChecked = true; }
                            else if (value == "False") { this.addDefaultStylesWithinPreTags.IsChecked = false; }
                        }
                        else if (xmlReader.Name == "CssClassName")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            this.cssClassName.Text = value;
                        }
                        else if (xmlReader.Name == "AddPreTag")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            if (value == "True") { this.AddPreTag.IsChecked = true; }
                            else if (value == "False") { this.AddPreTag.IsChecked = false; }
                        }
                        else if (xmlReader.Name == "AddBGColor")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            if (value == "True") { this.AddBGColor.IsChecked = true; }
                            else if (value == "False") { this.AddBGColor.IsChecked = false; }
                        }
                        else if (xmlReader.Name == "TextBoxColor")
                        {
                            value = xmlReader.ReadElementContentAsString();
                            this.TextBoxColor.Text = value;
                        }
                        break;
                    }
            }
        }
    }
}

QuestionRe: Reading a XML file from IsolatedStorage ? Pin
Mark Salsbery14-Apr-09 7:24
MemberMark Salsbery14-Apr-09 7:24 
AnswerRe: Reading a XML file from IsolatedStorage ? Pin
Mohammad Dayyan14-Apr-09 11:56
MemberMohammad Dayyan14-Apr-09 11:56 
QuestionXAML - TreeView with CheckBoxes Pin
Jack Kril13-Apr-09 14:26
MemberJack Kril13-Apr-09 14:26 
AnswerRe: XAML - TreeView with CheckBoxes Pin
Eslam Afifi13-Apr-09 14:59
MemberEslam Afifi13-Apr-09 14:59 
QuestionClipping To Rounded Corners Pin
#realJSOP13-Apr-09 6:27
mva#realJSOP13-Apr-09 6:27 
AnswerRe: Clipping To Rounded Corners [modified] Pin
Eslam Afifi13-Apr-09 8:42
MemberEslam Afifi13-Apr-09 8:42 
AnswerRe: Clipping To Rounded Corners Pin
Mark Salsbery13-Apr-09 10:45
MemberMark Salsbery13-Apr-09 10:45 
AnswerRe: Clipping To Rounded Corners Pin
sivaddrahcir20-Apr-09 9:31
Membersivaddrahcir20-Apr-09 9:31 
QuestionOnRenderComplete like event for WPF controls Pin
Pankaj Chamria13-Apr-09 2:38
MemberPankaj Chamria13-Apr-09 2:38 
QuestionContext menu in Datatemplate Pin
mikla52111-Apr-09 6:39
Membermikla52111-Apr-09 6:39 
QuestionRe: Context menu in Datatemplate Pin
Mark Salsbery11-Apr-09 8:42
MemberMark Salsbery11-Apr-09 8:42 
AnswerRe: Context menu in Datatemplate [modified] Pin
mikla52111-Apr-09 20:54
Membermikla52111-Apr-09 20:54 
QuestionRe: Context menu in Datatemplate Pin
Mark Salsbery13-Apr-09 9:47
MemberMark Salsbery13-Apr-09 9:47 
AnswerRe: Context menu in Datatemplate Pin
mikla52113-Apr-09 22:11
Membermikla52113-Apr-09 22:11 
GeneralRe: Context menu in Datatemplate Pin
Mark Salsbery14-Apr-09 8:00
MemberMark Salsbery14-Apr-09 8:00 
GeneralRe: Context menu in Datatemplate Pin
mikla52114-Apr-09 21:11
Membermikla52114-Apr-09 21:11 
GeneralRe: Context menu in Datatemplate Pin
Mark Salsbery14-Apr-09 21:23
MemberMark Salsbery14-Apr-09 21:23 

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.