本文介绍了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:如何在横向模式下打印?
发布评论