We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the images in the OlapClient control.

Platform: Silverlight |
Control: OlapClient

The OlapClient ToolBar images, OlapChart and OlapGrid ToolBar images can be customized with new images. This can be achieved by creating a Template for those images and assigning those templates to corresponding buttons. Please refer the below code snippet to know how to customize the OlapClient images.

  1. Creating Templates for images



        <DataTemplate x:Key="AddReport">

                <Image Visibility="Visible" Source="Add_Report.png" />


        <DataTemplate x:Key="ShowLegend">

            <Image Visibility="Visible" Source="ShowChartLegend.png" />


        <DataTemplate x:Key="GridCellToolTip">

            <Image Visibility="Visible" Source="GridCellToolTip.png" />




  1. Setting those templates to the corresponding button.



private OlapToolBarButton btnToolBar;

private void OlapClientWindow_Loaded(object sender, RoutedEventArgs e)


            SetImage(this.OlapClient.OlapClientToolBar, "PART_New", "AddReport");

            SetImage(this.OlapClient.OlapChartToolBar, "PART_ShowLegend", "ShowLegend");

            SetImage(this.OlapClient.OlapGridToolBar, "PART_VToolTip", "GridCellToolTip");




        private void SetImage(OlapToolBar olapToolBar, string BtnName, string TemplateName)


            DataTemplate myTemplate = (DataTemplate)this.Resources[TemplateName];

            for (int i = 0; i < olapToolBar.Items.Count; i++)


                if (olapToolBar.Items[i] is OlapToolBarButton)


                    btnToolBar = olapToolBar.Items[i] as OlapToolBarButton;

                    if (btnToolBar.Name == BtnName)


                        btnToolBar.ContentTemplate = myTemplate;









Figure: OlapClient ToolBar image for “NewReport” has been customized


Figure: OlapChart ToolBar image for “ShowLegend” has been customized


You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile