09 2013 档案
摘要:如图:点击浏览可弹出选择文件对话框,显示文件路径1.在项目中添加新项,选择天加一个控件UserControl1.xaml,取名FileInputBox在用户控件添加按钮和文本框,XAML代码如下:浏览...2.用户控件cs代码如下: public partial class FileInputBox : UserControl { public FileInputBox() { InitializeComponent(); theTextBox.TextChanged += new TextChangedEventHandler(OnTextChanged); } private void t
阅读全文
摘要:读取XPS格式文件或将doc,txt文件转化为XPS文件,效果图如下:1.XAML页面代码: 2.后台CS文件代码:首先引用Microsoft.Office.Interop.Word.dll;//具体代码如下↓using System;using System.IO;using System.Linq;using System.Windows;using System.Windows.Controls;using System.Windows.Xps.Packaging;using System.Xml;using Microsoft....
阅读全文