Trying to jump from decades of classic VB to .Net and WPF, I am working through this Microsoft tutorial: "Walkthrough: My First WPF Desktop Application", which is here: https://msdn.microsoft.com/en-gb/library/mt270964.aspx.
Nearing the end, I am getting this error, which doesn't appear to fit the actual code.
'The 'Grid' start tag on line 37 position 10 does not match the end tag of 'StackPanel'. Line 63, position 15.' XML is not valid.
Note: the line numbers in the following code snippet are the same as those in the VS2015 IDE
I am not sure if it will help your problem or not, but the following XAML is not giving any error on my machine.
This XAML is almost exactly the same as yours except that I have taken out Style="{StaticResource labelStyle}" from line 50 and 51, 56 and 57 I have also taken out ColumnHeaderStyle="{StaticResource columnHeaderStyle}" from line 63 in your code and ImageSource="watermark.png" from line 24 (primarily because I do not have these StaticResources on my machine)
Hi FaheemAhmadGul,
It's been a long time since you last posted a question that I could help with.
Thank you for your comment.
In accordance with the tutorial, that portion of the code has just been modified to link to an XmlDataProvider from another part of the project. It was that change that initiated the error.
I saved and closed the project after posting the question. After reopening, the design-time XML error has gone away, but I do get an XMLParseException when I try to run the project. I am still trying to find exactly where that is and whether it is the same problem problem in another guise
This is the error
System.Windows.Markup.XamlParseException was unhandled
Message: An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
Additional information: 'Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '29' and line position '55'.
This XAML is almost exactly the same as yours except that I have taken out Style="{StaticResource labelStyle}" from line 50 and 51, 56 and 57 I have also taken out ColumnHeaderStyle="{Static
Open in new window