OnPaint in ODFViewWPF


i want to port my pdf viewer from windows forms to wpf.
i used the method onPaint in windows forms. But onPaint is not available in WPF.

        protected override void OnPaint(PaintEventArgs e)
            if (base.GetDoc() == null)
            //Draw something

If the user select an menu button i want to draw something. is there any way to do this also in wpf?

Hi David,

WPF model is different from WinForms… It is sort of similar to HTML DOM model … so there is no OnPaint.

PDFNet SDK for .NET 4+ (http://www.pdftron.com/pdfnet/downloads.html) includes WPF specific control (pdftron.PDF.PDFViewCtrlWPF). For a sample of how to use it, please take a look at PDFViewWPF and PDFViewWPFSimple (which are included in PDFNet/Samples folder).

This means there is no possibility to draw something on the PDFViewerWpf?