title: How to Set Syntax Highlighting in AvalonEdit?
body: <p>I'm trying to set the Syntax Highlighting in my program I'm making that uses AvalonEdit</p>
  
  <p>This is the code that I'm using:</p>
  
  <pre><code>StreamResourceInfo sri = Application.GetResourceStream(new Uri("lua.xshd"));
          using (Stream s  = sri.Stream)
          {
              using (XmlTextReader reader = new XmlTextReader(s))
              {
                  var gLua = HighlightingLoader.LoadXshd(reader);
                  editor.SyntaxHighlighting = HighlightingLoader.Load(gLua, HighlightingManager.Instance);
                  editor.Text = reader.ToString();
              }
          }
  </code></pre>
  
  <p>I'm also getting</p>
  
  <blockquote>
    <p>A first chance exception of type 'System.UriFormatException' occurred in System.dll</p>
  </blockquote>
  
  <p>How should I change this to make it work?</p>