Articles in this section
Category / Section

How to add button in the OlapClientToolBar

1 min read

We can add a button in the Olap Client Tool bar and the customizable function can be written in the click event of that button. Please refer the below code snippet to know how to add button in the OlapClient Tool Bar.

C#

 
public MainPage()
        {
            InitializeComponent();
            this.DataContext = new ViewModel.ViewModel();
            this.olapClient.Loaded += olapClient_Loaded;
        }
 
        void olapClient_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            
            OlapToolBarButton otb = new OlapToolBarButton();
            otb.Style = olapClient.ButtonStyle;
            otb.Width = 38;
            otb.Height = 38;
 
            otb.Content = new Image() { Source = new System.Windows.Media.Imaging.BitmapImage(new System.Uri("/PagingDemo;component/Image/ChartToolTip.png", System.UriKind.RelativeOrAbsolute)) };
 
            this.olapClient.OlapClientToolBar.AddItem(otb, "ChartOnly");
            otb.Click += otb_Click;
 
 
        }
 
        void otb_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            this.olapClient.DisplayMode = Syncfusion.Silverlight.Client.Olap.DisplayModes.ChartOnly;
        }

 

 

Figure: Added new Button in OlapClient ToolBar

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied