Spire.Doc for WPF Quick Start

Posted by Lacy under WPF category on | Points: 40 | Views : 2906
This document aims at clearly introducing a simple "HelloWorld" demo about Spire.Doc for WPF by using Visual Studio. The below procedure will help you realize this task step by step. Before getting started, please make sure that Spire.Doc for WP F and Visual Studio are correctly installed on system.

Spire.Doc for WPF Download Zip:http://www.e-iceblue.com/downloads/hot_fix/spire.doc_hotfix_4.2.11.zip

using Spire.Doc;
using Spire.Doc.Documents;

namespace HelloWord_Spire.doc_WPF
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
public MainWindow()

private void btn1_Click(object sender, RoutedEventArgs e)
//create a new document using spire.Doc
Document document = new Document();

//add one paragraph
Paragraph paragraph = document.AddSection().AddParagraph();
paragraph.AppendText("Hello, World!");

//save the document
document.SaveToFile(@"..\..\sample.doc", FileFormat.Doc);

//launch the document

Code Source:http://www.e-iceblue.com/Knowledgebase/Spire.Doc.html

Comments or Responses

Login to post response