Custom options in WPF PrintDialog
I'm in the process of migrating portions of an application from Windows Forms to WPF. The current portion I'm working on involves printing a graph that represents a portion of time on a timeline. We previously used the Windows Forms PrintDialog which offered the ability to print开发者_开发知识库 the "Current Page" and have custom checkboxes for application-specific options. I'd like the option to print the section of the timeline the user is currently viewing, or producing a whole stack of pages if they want to print the entire timeline.
Using the WPF PrintDialog I don't see any way to do the same thing right off the bat. From what I can tell the Current Page option is present and greyed out, but not supported by the dialog (which seems REALLY stupid). Am I stuck creating a custom print dialog or is there an easier way I'm missing?
You can use the UserPageRangeEnabled
property of PrintDialog
but that only for setting the Current page, or other pages.
If you need further customization, I'm afraid that you will need to clone the PrintDialog.
精彩评论