Pat
Pat

Reputation: 16891

Make content expand and collapse when using the Microsoft Ribbon for WPF

I don't understand how to get the default ribbon minimization behavior shown in MS Word in my app (using MS Ribbon for WPF). (Specifically, when the ribbon is minimized, the content area moves up to fill the space that the ribbon previously filled.)

If I just put an element in the Grid containing my Ribbon, it doesn't automatically move to fill the space when the ribbon is minimized.

Any pointers?

Upvotes: 3

Views: 818

Answers (1)

Pat
Pat

Reputation: 16891

It's funny how you can search and search, then when you finally ask the question you find the answer yourself.

It's as simple as putting the ribbon in a Grid with two Rows, the top with Height="Auto" and the bottom with Height="*". See http://wpf.codeplex.com/Thread/View.aspx?ThreadId=39958. The trick is to remember to add the Grid.Row property to the ribbon and your content control.

Upvotes: 4

Related Questions