void doc_PrintPage(object sender, PrintPageEventArgs e)
 {
     printPanel.Height = e.PrintableArea.Height;
     printPanel.Width = e.PrintableArea.Width;
     e.PageVisual = printPanel;
     e.HasMorePages = false;
 }
        void doc_PrintPage(object sender, PrintPageEventArgs e)
        {
            printPanel.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity));
            printPanel.Width = printPanel.DesiredSize.Width;
            printPanel.Height = printPanel.DesiredSize.Height;

            double factor = 1;
            if (printPanel.Width > printPanel.Height)
            {
                factor = e.PrintableArea.Width / printPanel.Width;
            }
            else
            {
                factor = e.PrintableArea.Height / printPanel.Height;
            }

            ScaleTransform scale = new ScaleTransform { ScaleX = factor, ScaleY = factor };
            img.RenderTransform = scale;
            e.PageVisual = printPanel;
        }
示例#3
0
        private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
        {
            Chart _chart = this.sp_left.Children.OfType<Chart>().FirstOrDefault();

            if (_chart != null)
            {
                #region Cancel Code
                //_chartOriginalWidth = _chart.Width;
                //_chartOriginalHeight = _chart.Height;

                //_chart.Width = e.PrintableArea.Width;
                //_chart.Height = e.PrintableArea.Height;
                #endregion

                e.PageVisual = this.sp_left;
                e.HasMorePages = false;
            }
            else
                MessageBox.Show("請先查詢製圖再列印!");
        }
 private void OnSchedulerPrintPage(object sender, PrintPageEventArgs e)
 {
     this.SchedulerIsBusy = true;
     Scheduler.xScheduleView.Width = e.PrintableArea.Width;
     Scheduler.xScheduleView.Height = e.PrintableArea.Height;
     Scheduler.xScheduleView.UpdateLayout();
     e.PageVisual = Scheduler.xScheduleView;
     e.HasMorePages = false;
 }
示例#5
0
 void doc_PrintPage(object sender, PrintPageEventArgs e)
 {
     OrderControl cntrl=new OrderControl();
     cntrl.DataContext = OrderOperations.Current.CurrentOrder;
     e.PageVisual = cntrl;
 }
		/// <summary>
		/// This event is used to set the print content.
		/// </summary>
		private void PrintDocument_PrintPage(object sender, PrintPageEventArgs e)
		{
			if (printContent != null)
				e.PageVisual = printContent;
		}
示例#7
0
 private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
 {
     e.PageVisual = TreeGrid;
 }
    void doc_PrintPage(object sender, PrintPageEventArgs e)
    {
        PrintImage.Height = FocusHeight;
        PrintImage.Width = FocusWidth;
        if (popMenu.Tag.ToString() == "MediumImageScrollViewer")
        {
            PrintImage.Height *= 0.8;
            PrintImage.Width *= 0.8;
        }
        else if (popMenu.Tag.ToString() == "SmallImageScrollViewer")
        {
            PrintImage.Height *= 0.6;
            PrintImage.Width *= 0.6;
        }
 
        ImageInf.Text = "头像类型:" + popMenu.Tag.ToString().Replace("ScrollViewer", "") + "  宽:" + PrintImage.Width + "px  高:" + PrintImage.Height + "px";
        AppInf.Text = "Product Details: HaoRan.WebCam Beta2";
        PrintArea.Width = e.PrintableArea.Width;
        PrintArea.Height = e.PrintableArea.Height;
       
        e.PageVisual = PrintArea;
        // 指定是否再次调用另一个页
        e.HasMorePages = false;
    }
        void pd_PrintPage(object sender, PrintPageEventArgs e)
        {
            if (printSheet == null)
                printSheet = new BADSSheet(accountInfo, _contacts, allEntitlements, entitlementGroups, allSigners, e.PrintableArea, e.PageMargins);

            e.PageVisual = printSheet.NextPrintPage();
            bool hasMorePages = printSheet.hasMorePagesToPrint();
            e.HasMorePages = hasMorePages;

            if (!hasMorePages)
                printSheet = null;
        }
 void pd_PrintPage(object sender, PrintPageEventArgs e)
 {
     e.PageVisual = espacioFormulario;
 }
 void page4_PrintPage(object sender, PrintPageEventArgs e)
 {
     idExamen.Text = idMuestra;
     nombrePaciente.Text = nombre.Text;
     fechaBio.Text = fecha.Text;
     rtb.Xaml = diagnosticoBiopsia.Xaml;
     rtb.Margin = new Thickness(20, -1030, 0, 0);
     e.PageVisual = grid;
 }
        void page2_PrintPage(object sender, PrintPageEventArgs e)
        {
            rect.Height = 450;
            rect.Width = diagnosticoBiopsia.Width + 100;
            rect.Fill = new SolidColorBrush(Colors.White);
            rect.VerticalAlignment = VerticalAlignment.Top;

            rectBottom.Height = 80;
            rectBottom.Width = diagnosticoBiopsia.Width + 100;
            rectBottom.Fill = new SolidColorBrush(Colors.White);
            rectBottom.VerticalAlignment = VerticalAlignment.Bottom;

            idExamen.Text = idMuestra;
            idExamen.Margin = new Thickness(idMuestra_txt.Margin.Left - 80, -640, 0, 0);
            idExamen.FontSize = 18;
            idExamen.FontWeight = idMuestra_txt.FontWeight;
            idExamen.FontFamily = nombre.FontFamily;
            idExamen.Width = idMuestra_txt.Width;
            idExamen.Height = idMuestra_txt.Height;

            nombrePaciente.Text = nombre.Text;
            nombrePaciente.Margin = new Thickness(nombre.Margin.Left, -520, 0, 0);
            nombrePaciente.FontSize = 13;
            nombrePaciente.FontFamily = nombre.FontFamily;
            nombrePaciente.Width = nombre.Width;
            nombrePaciente.Height = nombre.Height;

            fechaBio.Text = fecha.Text;
            fechaBio.Margin = new Thickness(fecha.Margin.Left - 100, -520, 0, 0);
            fechaBio.FontSize = 13;
            fechaBio.FontFamily = nombre.FontFamily;
            fechaBio.Width = fecha.Width;
            fechaBio.Height = fecha.Height;

            rtb.Xaml = diagnosticoBiopsia.Xaml;
            rtb.VerticalAlignment = VerticalAlignment.Top;
            rtb.Height = diagBoxHeight;
            rtb.Width = diagnosticoBiopsia.Width;
            rtb.Margin = new Thickness(20, -30, 0, 0);
            //rtb.Margin = new Thickness(20, -85, 0, 0);
            rtb.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
            rtb.BorderBrush = diagnosticoBiopsia.BorderBrush;
            e.PageVisual = grid;
        }
        /********************************************************************************************************************************
        *********************************************************************************************************************************
        *********************************************                           *********************************************************
        *********************************************     PRINTING HANDLING EVENTS    *********************************************************
        *********************************************                           *********************************************************
        *********************************************************************************************************************************
        *********************************************************************************************************************************/

        /**************
         *   PAGE 1   *
         **************/
        void page1_PrintPage(object sender, PrintPageEventArgs e)
        {
            switch (pagesToPrint)
            {
                case 1:
                    isMorePages = false;
                    isMorePages2 = false;
                    isMorePages3 = false;
                    break;
                case 2:
                    isMorePages = true;
                    isMorePages2 = false;
                    isMorePages3 = false;
                    break;
                case 3:
                    isMorePages = true;
                    isMorePages2 = true;
                    isMorePages3 = false;
                    break;
                case 4:
                    isMorePages = true;
                    isMorePages2 = true;
                    isMorePages3 = true;
                    break;
                default:
                    isMorePages = true;
                    isMorePages2 = true;
                    isMorePages3 = true;
                    break;
            }

            e.PageVisual = espacioFormulario;
        }
 private void PrintInvoicePrintPage(object sender, PrintPageEventArgs e)
 {
     e.PageVisual = Urkunde;
 }
 void pd_PrintPage(object sender, PrintPageEventArgs e)
 {
     e.PageVisual = PrintArea;
 }
示例#16
0
        private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
        {
            Chart _chart = this.Chart_Grid.Children.OfType<Chart>().FirstOrDefault();

            if (_chart != null)
            {
                
                // A4 Size
                //_chart.Width = 770;
                //_chart.Height = e.PrintableArea.Height;

                e.PageVisual = this.Chart_Grid;
                e.HasMorePages = false;
            }
            else
                MessageBox.Show("請先查詢製圖再列印!");
        }
 void pd_PrintPage(object sender, PrintPageEventArgs e)
 {
     Viewbox vb = new Viewbox();
     vb.Width = e.PrintableArea.Width;
     vb.Height = e.PrintableArea.Height;
     vb.Child = canvas1;
     e.PageVisual = vb;
 }
 void pd_PrintPage(object sender, PrintPageEventArgs e)
 {
     throw new NotImplementedException();
 }
 private void pd_PrintPage(object sender, PrintPageEventArgs e)
 {
     e.PageVisual = LayoutRoot;
 }
        private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
        {
            Chart _chart = this.Chart_Container.Children.OfType<Chart>().FirstOrDefault();

            if (_chart != null)
            {
                //Content_Below();

                e.PageVisual = this.Chart_Grid;
                //e.PageVisual = Content_Below();
                e.HasMorePages = false;
            }
            else { MessageBox.Show("請先查詢製圖再列印!"); }
        }
示例#21
0
 private void pdoc_PrintPage(object sender, PrintPageEventArgs e) {
   if (this.EffectivePageCount <= 0) {
     this.PageSize = e.PrintableArea;
     this.EffectivePageCount = this.PageCount;
   }
   e.PageVisual = GetPage(this.PageIndex++);
   e.HasMorePages = this.PageIndex < this.EffectivePageCount;
 }
示例#22
0
        private void PrintPageHandler( object sender, PrintPageEventArgs e )
        {
            if ( _curentPage == 1 )
            {
                ////all pages are same size so only do this the first time.
                _printPage.Width = e.PrintableArea.Width;
                _printPage.Height = e.PrintableArea.Height;
            }

            e.PageVisual = _printPage;
            _printPage.UpdateLayout ();

            _printPage.TotalPageCount = GetTotalPages ();
            _printPage.Page = _curentPage;
            _printPage.ChangeOffset ( _curOffset );

            _curOffset += _printPage.GetHeightAvailable ();

            //The cover offset is used when something that cannot be paginated/split between pages is hit on a page line
            //So the print page covers the thing with white that is being cut and adjusts the overall offset to show it on the next page.
            var coverOffset = _coverOffsetCache[_curentPage];
            _printPage.CoverOffset = new GridLength ( coverOffset );
            _curOffset -= coverOffset;

            _printPage.UpdateLayout ();
            _curentPage++;

            e.HasMorePages = _curentPage <= _totalPages;
        }
		private void Document_PrintPage(object sender, PrintPageEventArgs e)
		{
			e.PageVisual = this.InvoiceModel.GetView(null) as UIElement;

			e.HasMorePages = false;
		}
 void report_PrintPage(object sender, PrintPageEventArgs e)
 {
     if (m_PageList.Count > 0)
     {
         e.PageVisual = m_PageList.First();
         m_PageList.RemoveAt(0);
         if (m_PageList.Count > 0)
         {
             e.HasMorePages = true;
         }
         else
         {
             e.HasMorePages = false;
         }
     }
 }
 void printDocument_PrintPage(object sender, PrintPageEventArgs e)
 {
     e.PageVisual = this.panelToPrint;
 }
示例#26
0
 void PrintDocPrintPage(object sender, PrintPageEventArgs e)
 {
     e.PageVisual = ((MainPage)Application.Current.RootVisual).ContentFrame;// Application.Current.RootVisual;
 }
示例#27
0
        private void PrintPageHandler(object sender, PrintPageEventArgs e)
        {
            var printCanvas = new DrawingControl();
            printCanvas.Height = e.PrintableArea.Height;
            printCanvas.Width = e.PrintableArea.Width;
            printCanvas.LoadDrawing(DrawingSerializer.SaveDrawing(drawingHost.CurrentDrawing));

            var savedScaleSetting = DynamicGeometry.Settings.ScaleTextWithDrawing;
            DynamicGeometry.Settings.ScaleTextWithDrawing = true;   // Must be true for text to appear as expected.
            printCanvas.Drawing.Recalculate();
            DynamicGeometry.Settings.ScaleTextWithDrawing = savedScaleSetting;

            e.PageVisual = printCanvas;
        }