printing - WPF Window.Measure not setting the DesiredSize -
I am trying to set up a printable view of my WPF window and I have a lot to bring to content The hard times are coming (okay!).
Specifically, measurement does not install the desired size of my window property.
The basic approach I am trying to take is that I have created a separate window object in which I want to print. Now I am trying to instantiate the program window and then sending it to the printer.
PrintView Print Weave = new printview (as mModel.Clone () MyModel); PrintView.Measure (new size (double.positinifinity, double-positive infinity)); PrintView.Arrange (new reset (new point (0, 0), printView.DesiredSize)); Principaloog.Printvisual (Printview, "Strategy"); // blank page every time
Unfortunately, set to volume on print 3. Always call 0 after call 3. Measure, the cause of the magazine printed page is empty, of course. I thought that. The measure is that the property set is supposed to be. The interesting thing is that if you paste a call. Organize, it works properly, so I understand it, this means that the layout has not passed. I can not understand how to force it to be implemented.
Any help would be greatly appreciated.
Edit: Posting code for printing
PublicModel p_Model {InitializeComponent (); TabSetContent1 Start (p_Model, p_Model, new model. Workbook ()); TabCompareContent1.Initialize (p_Model, New Model.Workbook ()); }
and XAM:
& Lt; Component: TabCompareContent x: Name = "TabCompareContent1" grid. Row = "1" IsPrintView = "true" /> & Lt; / Grid & gt; & Lt; / Window & gt;
To kick off a lot of content for call binding, etc. to start for each user control ... There is a lot of code involved in this exact same control main. The xaml page is used with the same calls. Get started () and do everything as expected.
It may be a call to UpdateLayout, at that point where the dialog is worked, this can be a trick.
Comments
Post a Comment