App Bar Integration vs. Replacement

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

App Bar Integration vs. Replacement

Post by adamaka »

So in my previous post here (http://forum.stimulsoft.com/viewtopic.php?f=10&t=34998) I was able to get the IntegrateToTheBottomAppBar & IntegrateToTheTopAppBar working. However, it's not so much as an Integration to as a replacement for the Application Bar, right? What I mean is, I have some buttons in my app bar in xaml, but when I run the app and show the viewer page, the buttons are replaced by the viewer buttons. Is there a way to add buttons to the application bar in the report viewer? Failing that, is there a way to move the default buttons around? Say, have all the active commands on the TopAppBar so I can fill the bottom with whatever I want?
If all else fails, do you have a style I can point to with my application bar that adopts the grey/orange Stimulsoft app bar style?

Thanks again
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: App Bar Integration vs. Replacement

Post by HighAley »

Hello.

There are two panels could be in the application on top and bottom. The IntegrateToTheBottomAppBar and IntegrateToTheTopAppBar properties enables them.
If you need to set style you could use next code:

Code: Select all

AppBar appBar;
appBar.Background = StiStoreColors.AppBarBackground;
appBar.BorderBrush = StiStoreColors.HeaderBrush;
How to aded button on the AppBArt you could see in our 'Navigator.RT' sample project.
Look at the BlankPage.xaml.cs file, An 'Reports Demo' button is adding there.

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

Re: App Bar Integration vs. Replacement

Post by adamaka »

Thanks! I missed that little button in the Navigator.RT sample. The theme thing works too. Also, you can modify the default Stimulsoft AppBar and AppBarButton themes by simply modifying the Page.TopAppBar and Page.BottomAppBar properties on the Page_Loaded event like so:

Code: Select all

private void BlankPage_Loaded(object sender, RoutedEventArgs e)
        {            
            foreach (var item in viewerControl.ToolbarPanel.Children)
            {
                if (item.GetType() == typeof(StiButton))
                {
                    ((StiButton)item).Style = (Style)App.Current.Resources["AppBarButtonStyle"];
                }
                else if (item.GetType() == typeof(Border))
                {
                    ((Border)item).Background = (Brush)App.Current.Resources["AppBarItemForegroundThemeBrush"];
                }
            }

            this.TopAppBar.Style = (Style)App.Current.Resources["GlobalAppBarStyle"];
            this.TopAppBar.Background = (Brush)App.Current.Resources["ApplicationPageBackgroundThemeBrush"];
            this.TopAppBar.BorderBrush = null;
        }
Thanks for the tip!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: App Bar Integration vs. Replacement

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Locked