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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:43:23+00:00 2026-05-22T00:43:23+00:00

I have a view, that when loaded contains a toolbar at the top, and

  • 0

I have a view, that when loaded contains a toolbar at the top, and two regions underneath.

I am currently using a grid, so:

  • row 0 contains the toolbar
  • row 1 contains region1 and
  • row 2 contains region2.

The toolbar has a toggle button, which when clicked, completely hides region1, and shows region 2, and visa-versa.

What is the best way to achieve this?

I have tried binding the 2 rows heights to get altered on the toggle, but the space is not filled correctly. VerticalAlignment="Stretch" and HorizontalAlignment="Stretch" are both used.

I have also tried enabling and disabling the itemcontrol hosting the region, but that doesn’t seem to work at all.

Any pointers as to what I have done are much appreciated! 🙂

  • 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-22T00:43:23+00:00Added an answer on May 22, 2026 at 12:43 am

    Not sure if I fully understand what you want. Something like this?

    <DockPanel>
        <ToggleButton Name="viewToggle" DockPanel.Dock="Top">Toggle Region</ToggleButton>
        <Grid>
            <ContentControl>
                <TextBlock>I'm region 1</TextBlock>
                <ContentControl.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ElementName=viewToggle, Path=IsChecked}" Value="False">
                                <Setter Property="ContentControl.Visibility" Value="Visible"></Setter>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding ElementName=viewToggle, Path=IsChecked}" Value="True">
                                <Setter Property="ContentControl.Visibility" Value="Hidden"></Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </ContentControl.Style>
            </ContentControl>
            <ContentControl>
                <TextBlock>I'm region 2</TextBlock>
                <ContentControl.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ElementName=viewToggle, Path=IsChecked}" Value="True">
                                <Setter Property="ContentControl.Visibility" Value="Visible"></Setter>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding ElementName=viewToggle, Path=IsChecked}" Value="False">
                                <Setter Property="ContentControl.Visibility" Value="Hidden"></Setter>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </ContentControl.Style>
            </ContentControl>
        </Grid>
    </DockPanel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web view that is loaded with an HTML that contains links.
I have a view, header.php, that gets loaded in various controller methods. It contains
I have a view that is loaded in the MainWindow.xib. It is just a
I have a view that contains nested views of the same type. Because of
I have presented the viewController which contains a navigation controller whose view is loaded
I have a grid, and on detail view I am using a tabstrip, each
I have an Entity (QuoteSheet) that contains a child entity (QuoteTask), which is loaded
I have an NSArray that contains a couple of items. The NSArray is loaded
I am beginner in rails. I have view that i try to print inside
I have a view that is rendered with ContentType of application/msword. For users this

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.