Application Bar Integration

Stimulsoft Reports.UWP discussion
Locked
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Application Bar Integration

Post by adamaka »

I want to add a "Back" button to my report viewer page to go back in the navigation stack. I'd like to add it to the application bar, and I saw on the video here: http://www.youtube.com/watch?v=Ai1mA6fc0G4 at time 1:20 that you can add the following code to your page constructor to integrate the viewer buttons to the application bar:

Code: Select all

StiOptions.Viewer.IntegrateToTheBottomAppBar = true;
StiOptions.Viewer.IntegrateToTheTopAppBar = true;
However, when I use this code in my code behind as shown, I get the following error:

Frame is not found!
Source - Stimulsoft.Report.Viewer.RT
Stack Trace - at Stimulsoft.Report.Viewer.RT.StiViewerControl.StiViewerControl_InitAppBars_Loaded(Object sender, RoutedEventArgs e) in d:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.Viewer.RT\Viewer\StiViewerControl.cs:line 693

I think this is due to the fact that I'm using the Okra Framework for Navigation (http://okra.codeplex.com/). The NavigationManager sets the Window.Current.Content to the target page, I believe and therefore is not using frames. Is there a way around this?
Anton Lozovskiy
Posts: 135
Joined: Tue Aug 11, 2009 9:38 am

Re: Application Bar Integration

Post by Anton Lozovskiy »

Hello,

Can you please send us a simple test application, which reproduce the issue?

Thank you.
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Re: Application Bar Integration

Post by adamaka »

Here you go. Uncomment the problem lines in MainPage.xaml.cs to see the crash.
Attachments
OkraVsStimulsoftDemo.zip
(9.42 MiB) Downloaded 336 times
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Re: Application Bar Integration

Post by adamaka »

I'm getting the same exact error when trying to click the following buttons in the report viewer:

-Page Size
-Export

When I click either of these I get the "Frame not found!" error.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Application Bar Integration

Post by HighAley »

Hello.

At this moment our component should be placed on a Frame to work properly.
Please, put the MainPage on the Frame then your problems will gone.
Thank you for your example. We'll consider your comments in further development.

Thank you.
adamaka
Posts: 27
Joined: Wed Oct 10, 2012 3:18 pm

Re: Application Bar Integration

Post by adamaka »

Thanks for the reply,
I did exactly that. I wrapped the INavigationTarget in Okra to use a Frame instead of a content control. See thread for anyone else:
http://okra.codeplex.com/discussions/398991
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Application Bar Integration

Post by HighAley »

Hello.

Let us know if you will need any additional help.

Thank you.
Locked