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 6774545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:48:00+00:00 2026-05-26T15:48:00+00:00

Weird subject so let me explain: I have a Silverlight MainPage with a border

  • 0

Weird subject so let me explain: I have a Silverlight MainPage with a border control at the top of the page of height 400. Once the user is Authenticated, I navigate to a child page. I also collapse the border on the MainPage. The child page shows correctly but there is a blank 400 space above it where the MainPage border control was before it was collapsed. I thought Visibilty.Collapsed is supposed to surrender back the space it occupies but it doesnt seem to do this. I have set VerticalAlignment=’Top’ on the frame object in the MainPage and also tried that setting on the child page but neither work.

Anyone have any suggestions? Thanks

Code Updated:

 <ScrollViewer>
    <Grid x:Name="LayoutRoot"
          DataContext='{StaticResource ViewModel}'>
        <Grid.RowDefinitions>
            <RowDefinition Height='400'></RowDefinition>
            <RowDefinition Height='*'></RowDefinition>
        </Grid.RowDefinitions>
  • 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-26T15:48:00+00:00Added an answer on May 26, 2026 at 3:48 pm

    You should be able to resolve this by wrapping the border in a grid and then setting the height of the RowDefinition containing the border to Auto. The following test example worked for me:

    <Grid x:Name="MainGrid" Height="760" VerticalAlignment="Top" Background="Azure">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition x:Name="HeaderRow"  Height="Auto"></RowDefinition>
            <RowDefinition x:Name="TabRow" Height="*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
    
        <Border BorderThickness="1" Grid.Row="0" Background="Bisque" 
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            Name="HeaderBorder"
                            CornerRadius="10">
            <TextBlock>Test</TextBlock>
        </Border>
        <TextBlock Grid.Row="1">Test2</TextBlock>
        <Button Grid.Row="2" Content="Hide Border" Click="Button_Click"></Button>
    
    </Grid>
    

    And in the code behind:

    private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
    {
        HeaderBorder.Visibility = Visibility.Collapsed;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Weird question: I have an iPod Touch and plan to get an iPhone once
Weird title, I know, let me explain. I am a developer most familiar with
Weird behavior when mixing loading of assemblies using Assembly.LoadFrom and Assembly.Load : I have
Weird to describe but here goes. I have a table with several rows. One
My weird monitor's native resolution isn't recognized by Windows, so I have to set
Weird question, but I have a dictionary created with StringComparer.OrdinalIgnoreCase, looks something like this
Weird stuff... I have happily used EclipseLink / JPA 2 as provider for my
Weird question but here goes... I have a webpage and i want to get
Weird question, perhaps. We have a number of simple utilities written in-house that need
I have a weird error when try to redirect a exception to STDERR. I

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.