Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Windows 8.1, 10, WindowsPhone, Windows UWP

Single Page Display with Horizontal Paging?

More
IP: 192.168.0.71 8 years 4 months ago #13078 by smccoole
Hi,
I'm trying out RadaeePdf as a way to do large PDF display in a React Native app. I've managed to get iOS and Android going but I am having issues with Windows UWP. The idea is that this application would run on Surface Pro tablets. I'm trying to set up a single page display that will page Horizontally like view mode 3 on Android. I've looked around and there doesn't seem to be an example or documentation that gives me enough information to do this. Is it possible? If so, How would I go about it?
Thanks!
More
IP: 192.168.0.71 8 years 4 months ago #13079 by nermeen
You need to set PDFView.viewMode = 2; and in PDFReaderPage when creating new PDFViewDual(mPDFView) you should do the following:
Code:
m_view = new PDFViewDual(mPDFView); Boolean[] paras = new Boolean[m_doc.PageCount]; int cur = 0; while (cur < paras.Length) { paras[cur] = false; cur++; } ((PDFViewDual)m_view).vSetLayoutPara(null, paras,false);
More
IP: 192.168.0.71 8 years 4 months ago #13082 by smccoole
Thanks nermeen. The single page is displaying in the center of the screen using the code that you provided. It still smooth scrolls thought. Is there an equivalent to g_paging_enabled under iOS?
More
IP: 192.168.0.71 8 years 4 months ago #13090 by nermeen
No, because of a limit in the ScrollViewer of Windows.
You can disable m_scroller.IsScrollInertiaEnabled in PDFView.PDFView(Canvas parent), it will limit the continuous scroll.

You can also do the following as a workaround (but it does not have a smooth effect), in vOnTouchUp add:
Code:
PDFPos pos = vGetPos(m_w/2, m_h/2); vGotoPage(pos.pageno);
Code:
private void vOnTouchUp(object sender, PointerRoutedEventArgs e) { .... if (m_touched) { ..... } if (m_pressed) { m_pressed = false; PDFPos pos = vGetPos(m_w/2, m_h/2); vGotoPage(pos.pageno); } }
More
IP: 192.168.0.71 8 years 4 months ago #13096 by smccoole
Hmm, ok. I was hoping that there might be something that could be done with HorizontalSnapPointsType but I think to do that the top level container in the ScrollViewer has to implement IScrollSnapPointsInfo which I don't think it does. I'm still getting into Windows development so I wasn't sure if it was something that could be done or not. Thanks!
Time to create page: 0.401 seconds
Powered by Kunena Forum