You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 [C#] Print Button on Wed Aug 18, 2010 11:31 pm

Top


Contributor
Loading
It's a simple button, all you do is click on it. And something from your computer page, it'll print.
Code:

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Xps.Packaging;
using System.IO;

namespace Documents
{
    public partial class ViewXPS : System.Windows.Window
    {
        public ViewXPS()
        {
            InitializeComponent();
        }

        private void window_Loaded(object sender, RoutedEventArgs e)
        {
            XpsDocument doc = new XpsDocument("a.xps", FileAccess.Read);
            docViewer.Document = doc.GetFixedDocumentSequence();
            doc.Close();
        }
    }
}

View previous topic View next topic Back to top  Message [Page 1 of 1]

Related topics

Permissions in this forum:
You cannot reply to topics in this forum