开发者

Silverlight how to start a RadRibbonBar in "IsCollapsed" mode - property is ReadOnly

We have a Silverlig开发者_开发百科ht application with a RadRibbonBar at the top. The user can collapse it (not Visibility.Collapse) to just the menus with a double-click.

The IsCollapsed property is ReadOnly, but we need to retain the user preferences across runs of the app.

How do you programmatically set the IsCollapsed state of a RadRibbonBar?

Result

Silly me (and shows that the documentation is a little hard to find/follow). I had to google "RadRibbonBar IsMinimised" to find the actual page: http://www.telerik.com/help/silverlight/telerik.windows.controls.ribbonbar-telerik.windows.controls.radribbonbar-isminimized.html

Thanks to Stephen McDaniel for pointing out my error.


I think you might be confusing "Collapsing" a RibbonBar with the idea of "Minimizing" it.

Collapsing is something the RibbonBar does automatically when the window gets very small - which is why it's ready-only. From the documentation:

RadRibbonBar supports collapsing, which means that the ribbon may automatically collapse to save space when the application is resized to a smaller size.

But what you are describing (double clicking to get just the menu) is called Minimizing. From the documentation:

RadRibbonBar supports minimization, which means that the ribbon may be hidden so that only its tab headers remain visible. In this state, more screen real estate is available to the client area of the window.

And luckily, controlling Minimization via code is very easy. You can use the IsMinimized property:

IsMinimized - use this property to set or get the current minimize state of the ribbon.

So you should be using the IsMinimized property instead of IsCollapsed.

You can check out the documentation links I provided above for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜