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

  • Home
  • SEARCH
  • 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 8316425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:21:40+00:00 2026-06-08T21:21:40+00:00

I have an (right-direction) expander which should hide the header when expanded, and display

  • 0

I have an (right-direction) expander which should hide the header when expanded, and display some text rotated to be vertical down the right hand side when it is collapsed.
I have managed to achieve this using the following code:

<Expander Grid.Column="1" ExpandDirection="Left" 
      IsExpanded="True" Name="rightHandExpander"
      MaxWidth="{Binding RelativeSource={RelativeSource PreviousData}}">
    <Expander.Header>
        <TextBlock Text="Header text" RenderTransformOrigin="0,0"
            Visibility="{Binding IsExpanded, RelativeSource={RelativeSource 
                         AncestorType={x:Type Expander}, Mode=FindAncestor}, 
                         Converter={StaticResource boolToVisibilityConverter}}">
            <TextBlock.LayoutTransform>
                <TransformGroup>
                    <RotateTransform CenterX="25" CenterY="25" Angle="90" />
                </TransformGroup>
            </TextBlock.LayoutTransform>
        </TextBlock>
    </Expander.Header>
    <!-- controls here -->
</Expander>

However when the expander is collapsed, the header takes up far too much space- the text is rotated, but the header’s width appears to remain as if it has not.

Using VisualTreeHelper in the code-behind I discovered that the expander’s header, border and dockpanel were too large, but the inner toggle button was the correct size. I tried setting the header, border and dockpanel’s width to the correct size but they did not change.

Can anyone help?

Edit:
The expander is contained in a grid with two columns with a grid splitter and another expander in the first column. The other expander does the same thing but collapsing to the left hand side- this expander seems to work correctly, however.

  • 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-06-08T21:21:42+00:00Added an answer on June 8, 2026 at 9:21 pm

    I believe setting ‘HorizontalAlignment’ to ‘Right’ may fix the behaviour you are getting, as the default behaviour of most controls in a grid will be to fill all available space in their cell. It is kind of strange your left one works though, unless it is not directly in a grid, or has HorizontalAlignment set to Left?

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

Sidebar

Related Questions

Can anybody guide me in the right direction... I have some folder strucktures that
I'm in need of some pointing in the right direction here... I have a
I need to get pointed in the right direction. I have embedded an Iron
I need a little push in the right direction. Here's my problem: I have
I'm looking for a push in the right direction. I have a simple chat
I was wondering if anyone can point me in the right direction. I have
So, I have this simple code $('#info_name'+index).show(slide, {direction: right}, 1000, function(){ $('#info_info'+index).show('slide',{direction: up}, 1000);
I think i need a nudge in the right direction: I have two Tobjectlists
I need somebody to point me to the right direction, I have a MS
Can anyone point me in the right direction here. Is it possible to have

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.