Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.

Show PDF in Xamarin - navigation problem

More
IP: 192.168.0.71 8 years 9 months ago - 8 years 9 months ago #12407 by shm04
Hello,
I use Xamarin plugin. Current question is for iOS implementation. I use code from your sample at Git.
The problem is, that in your code Radaeepdf navigation bar (bookmarks, print, etc) can be shown only with next code:
...
UIViewController controller = plugin.OpenFromAssets("test.pdf", "");
...
this.NavigationController.PushViewController(controller, true);

So using of NavigationController is mandatory. But how to call this from Xamarin PCL code?
I tried next code in PCL::

PdsCrossPlatformPage myPage = new PdsCrossPlatformPage(n);
this.Navigation.PushAsync(myPage);
...
then I have to wait when page appears and call code to use NavigationController in iOS

PCL:
Xamarin.Forms.Device.StartTimer(TimeSpan.FromMilliseconds(1000), () =>
{
myPage.UseNav();
return false;
});

and here is code in iOS page renderer for PdsCrossPlatformPage
public void UseNav()
...
UIViewController controller = plugin.OpenFromPath("myfile.pdf", "");
/* all initialization for plugin has been applied before - settings, etc
selector = new RadaeeDelegate(plugin);
plugin.SetDelegate(selector);
*/

this.NavigationController.PushViewController(controller, true);

Yes, it shows file. And Radaee navigation bar exists too - see attach..
But too many problems and questions are here:
1) I need to wait until page appears - see timer above, Otherwise this.NavigationController is null
2) There are TWO page appears in Navigation - first empty PdsCrossPlatformPage, and then by timer - real viewer
3) No search button in Nav bar
Could you please help me to use it correctly? I have license for iOS and Android - I can provide you with data in secured message.
Last edit: 8 years 9 months ago by shm04.
More
IP: 192.168.0.71 8 years 9 months ago #12408 by shm04
PS. I have activated license. Now Search button exists in Navbar, and controls looks bit other. So question 3) has been closed.
More
IP: 192.168.0.71 8 years 9 months ago #12430 by support
Apologize for very late reply.
We're working on some improvement on the core and Objective-C frameworks which shall reflect on the Xamarin/Cordova module too.
Hopefully at the beginning of next week we shall publish a new Xamarin release.
Time to create page: 0.389 seconds
Powered by Kunena Forum