WPF:如何在横向模式下打印?

编程入门 行业动态 更新时间:2024-10-23 05:42:02
本文介绍了WPF:如何在横向模式下打印?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在线找到了此功能,效果很好...除了我可以无法弄清楚如何将其默认设置为横向打印.

found this function online, which works great... except I can't figure out how to default it to print in landscape.

private void PrintClick(object sender, RoutedEventArgs e) { PrintDialog dialog = new PrintDialog(); if (dialog.ShowDialog() == true) { dialog.PrintVisual(_PrintCanvas, "My Canvas"); } }

实际上如何设置默认值以将我的wpf内容打印为横向模式?

How does one actually set the default to print my wpf content to landscape mode?

推荐答案

private void PrintClick(object sender, RoutedEventArgs e) { PrintDialog dialog = new PrintDialog(); if (dialog.ShowDialog() == true) { ==> printDialog.PrintTicket.PageOrientation = PageOrientation.Landscape; dialog.PrintVisual(_PrintCanvas, "My Canvas"); } }

更多推荐

WPF:如何在横向模式下打印?

本文发布于:2023-10-28 18:09:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1537385.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:横向   如何在   模式下   WPF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!