Its really Simple and Easy to format any languge
- First You need to install AvalonEdit from Manage NuGet Packages. Use following link to install instructions http://www.nuget.org/packages/AvalonEdit
or Just right click on Project in Solution Explorer and Click Manage NuGet Packages, now click Online and Search Avalon Editor. Then Install AvalonEditor
- Just add following code in xaml file.xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
- Now add your TextEditor as follow<avalonedit:TextEditor SyntaxHighlighting="XML" x:Name="gameListXMLText" Height="200">
- Just Change SyntaxHighlighting as you want it could be C#
- Now Just load xml file as follow
gameListXMLText.Text = File.ReadAllText("sample.xml");
No comments:
Post a Comment