title: System.UnauthorizedAccessException with text-to-speech in Windows Phone 8
body: <p>I have the following piece of code for using text to speech feature in Windows Phone 8. I am using ssml, with bookmarks. But when changing any UI element in the Bookmark event called function, raises Unauthorized Exception.</p>
  
  <pre><code>private void Initialise_synthesizer()
          {
              this.synthesizer = new SpeechSynthesizer();
  
              synthesizer.BookmarkReached += new TypedEventHandler&lt;SpeechSynthesizer, SpeechBookmarkReachedEventArgs&gt;
                  (BookmarkReached);
          }
  
  void BookmarkReached(object sender, SpeechBookmarkReachedEventArgs e)
          {
              Debugger.Log(1, "Info", e.Bookmark + " mark reached\n");
  
              switch (e.Bookmark)
              {
                  case "START":
                      cur = start;
                      break;
                  case "LINE_BREAK":
                      cur++;
                      break;
                  }
  **error here**  t1.Text = cur.ToString();
              }
  </code></pre>
  
  <p>But on running it gives the following error</p>
  
  <pre><code>A first chance exception of type 'System.UnauthorizedAccessException' occurred in System.Windows.ni.dll
  An exception of type 'System.UnauthorizedAccessException' occurred in System.Windows.ni.dll and wasn't handled before a managed/native boundary
  Invalid cross-thread access.
  </code></pre>
  
  <p>Any idea how to fix this error, or any work around.</p>