Open my application with (on) the ribbon backstage

Ribbon for WPF Forum

Posted 10 years ago by Stephane Franiatte
Version: 14.2.0611
Avatar

Hi,

what should I do if I want my application to start on the backstage?

IsApplicationMenuOpen="True" does not seem to work for me.

    <Grid>
        <ribbon:Ribbon x:Name="ribbon" 
                       ApplicationButtonLabel="File"
                       IsApplicationMenuOpen="True">

            <!--Quick Access Toolbar Items-->
            <ribbon:Ribbon.QuickAccessToolBarItems>
            </ribbon:Ribbon.QuickAccessToolBarItems>

            <!--The Project Menu Tab -->
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:Backstage Name="fltBackStage">

                    <!--Some stuff-->

                </ribbon:Backstage>
            </ribbon:Ribbon.ApplicationMenu>

            <!--Tabs-->
            <ribbon:Ribbon.Tabs>

                <!--Home Tab-->
                <ribbon:Tab Name="homeTab" 
                            Label="Home">

 Thanks

BTW IsApplicationMenuOpen="True" does not work on your BackstageIntro either. I am probably missing something.

[Modified 10 years ago]

Comments (3)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stephane,

That property won't work properly when set in XAML.  I would suggest setting that property in code in a Load event handler off your containing RibbonWindow instead.  It should work from that location.


Actipro Software Support

Answer - Posted 10 years ago by Stephane Franiatte
Avatar

Hi,

BTW the behavior is the same whether I set this property in the xaml or in the code-behind: the home tab appears instead of the backstage; and it is unexpectedly empty. I am currently looking for a Load event I could subscribe to...

Could you provide a working example?

[EDIT]

OK, I finally found a way to go:

<ribbon:Ribbon x:Name="ribbon" 
               IsApplicationMenuOpenChanged="OnIsApplicationMenuOpenChanged"
               Loaded="ribbon_Loaded">

 And in the code-behind:

''' <summary>
''' Set the backstage as the default view when the Ribbon has done loading.
''' </summary>
Private Sub ribbon_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ribbon.IsApplicationMenuOpen = True 
End Sub

[Modified 10 years ago]

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Stephane,

Good, I'm glad you got it going.  I knew it could be done in a Load event since we've done that before for another customer, but it appears that the RibbonWindow.Load event must fire before the Ribbon is done loading and is ready for use.  Doing it in the Ribbon.Load event handler is the right place.


Actipro Software Support

The latest build of this product (v24.1.3) 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.