Page 1 of 1

Application Bar Integration

Posted: Thu Oct 11, 2012 3:36 pm
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?

Re: Application Bar Integration

Posted: Thu Oct 11, 2012 3:59 pm
by Anton Lozovskiy
Hello,

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

Thank you.

Re: Application Bar Integration

Posted: Thu Oct 11, 2012 4:58 pm
by adamaka
Here you go. Uncomment the problem lines in MainPage.xaml.cs to see the crash.

Re: Application Bar Integration

Posted: Thu Oct 11, 2012 7:29 pm
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.

Re: Application Bar Integration

Posted: Fri Oct 12, 2012 8:45 am
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.

Re: Application Bar Integration

Posted: Mon Oct 15, 2012 1:04 pm
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

Re: Application Bar Integration

Posted: Tue Oct 16, 2012 12:32 pm
by HighAley
Hello.

Let us know if you will need any additional help.

Thank you.