Articles in this section
Category / Section

How to hide the axis of AxisElementBuilder in OLAP Client?

1 min read

You can hide the axis of AxisElementBuilder in OLAP Client as illustrated in the following code example.


public partial class MainPage : UserControl
        private IOlapDataProvider dataProvider;
        public object OlapDataManager;
        public MainPage()
        this.olapClient.Loaded += new System.Windows.RoutedEventHandler(olapClient_Loaded);
        private void InitializeConnection()
            Binding customBinding = new CustomBinding(new BinaryMessageEncodingBindingElement(), new HttpTransportBindingElement { MaxReceivedMessageSize = 2147483647 });
            EndpointAddress address = new EndpointAddress("");
            ChannelFactory<IOlapDataProvider> clientChannel = new ChannelFactory<IOlapDataProvider>(customBinding, address);
            dataProvider = clientChannel.CreateChannel();
            OlapDataManager olapDataManager = new OlapDataManager();
            olapDataManager.DataProvider = dataProvider;
            this.OlapDataManager = olapDataManager;
void olapClient_Loaded(object sender, System.Windows.RoutedEventArgs e)
        int cout = 0;
        void HideColumAxisElementBuilder(DependencyObject child)
            DependencyObject parent = VisualTreeHelper.GetParent(child);
            if (parent.ToString() == "System.Windows.Controls.Border")
                System.Windows.Controls.Border border = parent as System.Windows.Controls.Border;
                border.Visibility = System.Windows.Visibility.Collapsed;
            else if(cout <=1)


Partial Public Class MainPage
    Inherits UserControl
    Private dataProvider As IOlapDataProvider
    Public OlapDataManager As Object
    Public Sub New()
Private Sub olapClient_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)
    End Sub
    Private Sub InitializeConnection()
            Binding customBinding = New CustomBinding(New BinaryMessageEncodingBindingElement(), New HttpTransportBindingElement 
        MaxReceivedMessageSize = 2147483647
        Dim address As EndpointAddress = New EndpointAddress("")
            Dim clientChannel As ChannelFactory<IOlapDataProvider> =  New ChannelFactory<IOlapDataProvider>(customBinding,address) 
        dataProvider = clientChannel.CreateChannel()
        Dim olapDataManager As OlapDataManager = New OlapDataManager()
        olapDataManager.DataProvider = dataProvider
        Me.OlapDataManager = olapDataManager
    End Sub
Private Sub olapClient_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)
    End Sub
    Dim cout As Integer = 0
    Private Sub HideColumAxisElementBuilder(ByVal child As DependencyObject)
        Dim parent As DependencyObject = VisualTreeHelper.GetParent(child)
        If parent.ToString() = "System.Windows.Controls.Border" Then
            cout = cout + 1
                Dim border As System.Windows.Controls.Border =  parent as System.Windows.Controls.Border 
            border.Visibility = System.Windows.Visibility.Collapsed
        ElseIf cout <= 1 Then
        End If
    End Sub
End Class

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