开发者

Enable "Current Page" in PrintDialog

Im using a System.Windows.Controls.PrintDialog to let the user print one or more pages from my application. This is what I currently got:

        PrintDialog printDialog = new PrintDialog();

        printDialog.PageRangeSelection = PageRangeSele开发者_开发百科ction.AllPages;
        printDialog.UserPageRangeEnabled = true;

        if (printDialog.ShowDialog() == true)
        {
            // do print ...
        }

Im looking for the option to enable the Current Page radio button in the dialog. How to enable it?


If you will decompile reference PresentationFramework.dll by Reflector you would be able to see that this class have nothing about CurrentPage. I think this radiobutton is disabled by default in Win32PrintDialog. In WinForms this radiobutton definitely is disabled by default:

    [DefaultValue(false), SRDescription(SR.PDallowCurrentPageDescr)] 
    public bool AllowCurrentPage {
        get { return allowCurrentPage;}
        set { allowCurrentPage = value;}
    } 

I suppose that you can't enable this radiobutton, but I can be mistaken.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜