Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<Hi guys

I have a WPF application with crystal reports.
In the report viewer I use this code to hide Tabs

VB
Private Sub HideTabs()
        Dim crvObject As Object
        For Each crvObject In Me.Report1.Controls '<-- Here is the problem in Controls
            If crvObject.GetType Is GetType(PageView) Then
                myPageView = CType(crvObject, PageView)
                Dim crvObjectControl As Object
                For Each crvObjectControl In crvObject.controls
                    If crvObjectControl.GetType Is GetType(TabControl) Then
                        tbcReportTab = crvObjectControl
                    End If
                Next
            End If
        Next
        With tbcReportTab
            .ItemSize = New Size(0, 1)
            .SizeMode = TabSizeMode.Fixed
            .Dock = DockStyle.None
            .Left -= 4
            .Top -= 5
            .Width = .Parent.Width + 8
            .Height = .Parent.Height + 9
            .Anchor = AnchorStyles.Left Or AnchorStyles.Top Or AnchorStyles.Right Or AnchorStyles.Bottom
            .Appearance = TabAppearance.Buttons
        End With
        With tbcReportTab.TabPages(0)
            .BackColor = Color.FromArgb(255, 148, 154, 173)
        End With
    End Sub


I have used this code in a windows form application
and it works fine but in WPF there is a problem.

Can anyone help ?
Posted
Updated 18-Oct-13 3:34am
v2
Comments
thatraja 18-Oct-13 9:42am    
Screenshot please....use imgur.com
jomachi 18-Oct-13 11:38am    
Screenshot of the code ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900