我使用一个System.Windows.Controls.PrintDialog让用户从我的应用程序中打印一个或多个页面。这就是我现在得到的:
PrintDialog printDialog = new PrintDialog();
printDialog.PageRangeSelection = PageRangeSelection.AllPages;
printDialog.UserPageRangeEnabled = true;
if (printDialog.ShowDialog() == true)
{
// do print ...
}我正在寻找在对话框中启用当前页面单选按钮的选项。如何启用它?
发布于 2010-06-09 08:24:31
如果您要通过Reflector对引用PresentationFramework.dll进行反编译,您将能够看到这个类与CurrentPage无关。我认为这个无线电按钮在Win32PrintDialog中默认是禁用的。在WinForms中,这个无线电按钮在默认情况下绝对是禁用的:
[DefaultValue(false), SRDescription(SR.PDallowCurrentPageDescr)]
public bool AllowCurrentPage {
get { return allowCurrentPage;}
set { allowCurrentPage = value;}
} 我想你不能启用这个无线电按钮,但我可能弄错了。
https://stackoverflow.com/questions/3003900
复制相似问题