Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6115081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:03:00+00:00 2026-05-23T15:03:00+00:00

07-06-2011 4:34 AM | LINK Hi, We are facing a problem in Silverlight 3

  • 0

07-06-2011 4:34 AM | LINK

Hi,
We are facing a problem in Silverlight 3 with the placement of TabItem in the TabControl. We have a maximum of 9 tabs to be displayed. But the problem is that for different user profiles, the number of tabs may decrease i.e. we collapse the not required tabs accordingly. This creates a change in the way the tabs are displayed.
Below is a sample code to represent the same scenario:

<UserControl x:Class="TabControlTrial.MainPage" 
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
         xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" > 
<Grid x:Name="LayoutRoot"> 
    <Controls:TabControl Name="tbATReportMainMenu" TabStripPlacement="Top" Margin="5" Visibility="Visible"> 
        <Controls:TabItem Name="A" Header="XXXX  XXXXX XXXXXX XXXXXX" 
                          Visibility="Visible"> 
        </Controls:TabItem>            
        <Controls:TabItem Name="B" Header="XXXXXXXXXXX XXXXXXXX XXXXXX XXXXXX" 
                          Visibility="Visible" > 
        </Controls:TabItem> 
        <Controls:TabItem Name="C" Header="XXXXXXXXXXX XXXXXXX X XXXXXXXXXXX XXXXXXXX XXXXX XXXXXX" 
                          Visibility="Visible" > 
        </Controls:TabItem> 
        <Controls:TabItem Name="D" Header="XXXXXXXXXXX XXXXXXX X XXXXXXX XXXXX XXXXXX" 
                          Visibility="Visible" > 
        </Controls:TabItem> 
        <Controls:TabItem Name="E" Header="XXXXXXXXXXX XXXXXXXX XXXXXXXXXXXX XXXXXXXX XXXXXXX XXXXXX" 
                          Visibility=" Visible " > 
        </Controls:TabItem> 
        <Controls:TabItem Name="F" Header="XXXXXXXXXXXX XXXXXX XXXXXX X XXXXXXX XXXXXXX XXXXXXX XXXXXX" 
                          Visibility="Visible" > 
        </Controls:TabItem> 
        <Controls:TabItem Name="G" Header="XXXXXXXX XXXXXX" 
                          Visibility=" Visible " > 
        </Controls:TabItem> 
        <Controls:TabItem Name="H" Header="XXXXXXXX XX XXXXXXX XXXXXX" 
                          Visibility="Visible" > 
        </Controls:TabItem> 
        <Controls:TabItem Name="I" Header="XXXXXX XXXXXX XXX XXXX XX XXXXXXX XXXXXX" 
                          Visibility="Visible"  > 
        </Controls:TabItem> 
    </Controls:TabControl> 
</Grid> 

Output when all Tabs are set to visible.

enter image description here

Output when Tab E and G are collapsed.

enter image description here

As it can be seen from the screenshot above the Tabs get distorted in the alignment.
We have tried using all the Alignment properties for the TabItems and TabControl, but it is of no use.
Also note that the alignment can change based on screen resolutions.

Is there a way that this problem can be sorted?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:03:00+00:00Added an answer on May 23, 2026 at 3:03 pm

    The above problem can be solved if we add TabItems dynamically through xaml.cs rather than showing/hiding the TabItems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been passed a date string that looks like this: Thu%20Mar%2011%202010%2015%3A09%3A11%20GMT%2B0000%20(BST) I want
I have a link marked :remote => true that makes a get request to
So I have a long string that has text like: src=http://antibride.com/wp-content/uploads/2011/06/AttendantsA6.1.11.jpg alt= width=197 height=229
If I have a date that is 2011-01-02 and I subtract 7 days from
i have following HTML code:- <table class=results> <tr> <td> <a href=..>link</a><span>2nd Mar 2011</span><br>XYZ Consultancy
If you check out this link (http://noahsdad.com/state-fair-texas-2011/) you'll notice that scrolling side bar to
I'm having a link error under cmake that I don't have when compiling on
I have a data april/2010 to jan/2011 Is there any way to split the
I have a huge collection of visual foxpro dbf files that I would like
I have a ViewController embedded in a NavigationController. The ViewController has a UIWebView that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.