How to display minimize\maximize\close buttons in xbap

Ribbon for WPF Forum

Posted 16 years ago by Acer
Version: 3.0.0410
Avatar
How can I display minimize\maximize\close buttons in xbap applictions?

Comments (5)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Those buttons are part of RibbonWindow's template, not Ribbon, so they aren't available in XBAP by default.

That being said, the primitive controls are available in the Primitives namespace and you could add a horizontal stack of RibbonWindowTitleBarButton objects to the XBAP's control on top of Ribbon to get a similar effect.


Actipro Software Support

Posted 16 years ago by Acer
Avatar
How can I add a RibbonWindowTitleBarButton objects to the XBAP's control?
Is there a way to add them NOT as part of the quick access toolbar?
(I coulndn'd find the way to do it for xbap)?

Thanks,
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
As previously said, you can add a horizontal stack of RibbonWindowTitleBarButton objects to your root XBAP and align the stack to the upper right. Here is an example of the minimize button.

<ribbon:RibbonWindowTitleBarButton x:Name="MinimizeButton" AutomationProperties.Name="Minimize"
    Command="{x:Static ribbon:RibbonCommands.MinimizeWindow}" Focusable="False" ToolTip="Minimize" Style="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type ribbon:Ribbon},ResourceId=RibbonTitleBarButtonStyle}}" ToolTipService.InitialShowDelay="500" />
Although please note that for the next maintenance release, you won't want to include that Style attribute since the button will just get the style by default. This change should have been made a while ago.


Actipro Software Support

Posted 16 years ago by Acer
Avatar
I believe RibbonPage sould be part of the ribbon (like RibbonWindow),
it's pretty basic, the way I see it.
Will you include RibbonPage in your future version?
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm not sure what benefit it would give developers though. When you use Ribbon in a Page, you simply dock a Ribbon control at the top of the Page. There isn't any additional work needed to get it operating or looking right.

RibbonWindow is a separate class for several reasons, but mostly due to the customized rendering that needs to take place for the title bar, borders, and to have the status bar overlay the bottom border.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.