Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
590
Visibility of XamReportViewer toolbar buttons
posted

Hi,

How can I set visibility of XamReportViewer toolbar buttons? I tried to do this following way:

            var toolbarSettings = new ToolBarSettings();

            toolbarSettings.RefreshVisibility = Visibility.Collapsed;

            toolbarSettings.PageSettingsVisibility = Visibility.Collapsed;

            xrvPreview.ToolBarSettings = toolbarSettings;

Refresh button dissapeared, but Page Settings button stays visible.

  • 1125
    posted

    Hi andy369,

    Unfortunately there seems to be a bug related to the toolbar buttons' visibility that causes buttons to be visible when the control is added to the visual tree or if the control is resized. The bug was logged with # 98450. 

    As a workaround - if you want to always hide the refresh and page settings buttons from the toolbar - is to copy the viewer's default style in Blend and remove the buttons that you want to be hidden, and then apply the resulting style to the viewer control.