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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:28:07+00:00 2026-05-26T10:28:07+00:00

<Grid x:Name=LayoutRoot Background=White> <Grid.ColumnDefinitions> <ColumnDefinition Width=Auto/> <ColumnDefinition Width=Auto /> <ColumnDefinition Width=* /> </Grid.ColumnDefinitions> <ContentControl

  • 0
<Grid x:Name="LayoutRoot" Background="White">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <ContentControl Grid.Row="1" Grid.Column="0" Content="{Binding Path=CurrentNavigationView}" Visibility="{Binding NavigationPageVisibility}" Margin="2"/>
    <GridSplitter Grid.Row="1" Grid.Column="1" Width="3" Margin="1,6,1,6"  Visibility="{Binding NavigationPageVisibility}" HorizontalAlignment="Center" Background="{StaticResource NetApp_LightGray_Brush}" />
    <ContentControl    Grid.Row="1" Grid.Column="2" Margin="2" Visibility="{Binding WelcomePageVisibility}" Content="{Binding Path=CurrentWelcomeView}" />
</Grid>

In the above xaml i am setting the visibility of the 1st content control and splitter based on some condition in my ViewModel. But when in case i resize the splitter while running, then there is some empty space being shown before the last content control. I need the content control to occupy the complete real estate when i set the 1st content control and splitter to collapsed?

Appreciate the help.

  • 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-26T10:28:07+00:00Added an answer on May 26, 2026 at 10:28 am

    The problem is that the GridSplitter messes with the ColumnDefinitions, once you grab it the first column will no longer be Auto but a concrete pixel value. Here is an example which shows this:

    <Grid Height="100">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Name="c0" Width="Auto"/>
            <ColumnDefinition Name="c1" Width="Auto"/>
            <ColumnDefinition Name="c2" Width="*"/>
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Column="0" Text="{Binding Width, ElementName=c0}"/>
        <TextBlock Grid.Column="2" Text="{Binding Width, ElementName=c2}"/>
        <GridSplitter Grid.Column="1" Width="5" ResizeBehavior="PreviousAndNext"/>
    </Grid>
    

    So if you want it to be collapsible again you need to return the Width to Auto.

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

Sidebar

Related Questions

I have the following XAML: <Grid x:Name=LayoutRoot Background=White DataContext={Binding Source={StaticResource MyDataKey}}> <TextBox Name=_myId Text={Binding
I have a datagrid within a view <Grid x:Name=LayoutRoot Background=White Width=600 MaxHeight=150> <sdk:DataGrid x:Name=grid1
Here is a part of my DataForm <Grid x:Name=LayoutRoot Background=White> <df:DataForm x:Name=df1 HorizontalAlignment=Stretch VerticalAlignment=Stretch
I have the following in my XAML: <Grid x:Name=LayoutRoot Background=White> <Grid.RowDefinitions> <RowDefinition Height=20/> <RowDefinition
i have a parent usercontrol, here is an excerpt of xaml <Grid x:Name=LayoutRoot Width=Auto
I have the following sample from MSDN: <Grid x:Name=LayoutRoot Background=White> <Grid.RowDefinitions> <RowDefinition Height=25 />
Grid example with the trigger: <Grid x:Name=LayoutRoot DataContext={Binding ProjectGrid, Source={StaticResource Locator}}> <i:Interaction.Triggers> <i:EventTrigger EventName=Loaded>
The mainpage: MainPage.xaml <Canvas x:Name=LayoutRoot Background=White> </Canvas> MainPage.xaml.cs List<Usol> list = new List<Usol>(); for
I have a simply view: <Grid x:Name=LayoutRoot> <TextBox Height=23 HorizontalAlignment=Left Margin=66,66,0,0 Name=textBox1 VerticalAlignment=Top Width=120
I have the following XAML: <UserControl.Resources> <local:MainPageViewModel x:Key=ViewModel /> </UserControl.Resources> <Grid x:Name=LayoutRoot DataContext={Binding Source={StaticResource

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.