private void SaveStyleSheet_Click(object sender, RadRoutedEventArgs e)
 {
     SaveFileDialog sfd = new SaveFileDialog();
     sfd.Filter = "Xaml Files|*.xaml";
     if (sfd.ShowDialog() == true)
     {
         using (var stream = sfd.OpenFile())
         {
             Stylesheet stylesheet = new Stylesheet();
             stylesheet.ExtractStylesheetFromDocument(this.editor.Document);
             XamlFormatProvider.SaveStylesheet(stylesheet, stream);
         }
     }
 }