Dela via


Ribbon.ApplicationMenu Property

Gets or sets the RibbonApplicationMenu that is a logical child of this Ribbon control.

Namespace:  Microsoft.Windows.Controls.Ribbon
Assembly:  RibbonControlsLibrary (in RibbonControlsLibrary.dll)

Syntax

'Declaration
Public Property ApplicationMenu As RibbonApplicationMenu
public RibbonApplicationMenu ApplicationMenu { get; set; }
public:
property RibbonApplicationMenu^ ApplicationMenu {
    RibbonApplicationMenu^ get ();
    void set (RibbonApplicationMenu^ value);
}
member ApplicationMenu : RibbonApplicationMenu with get, set
function get ApplicationMenu () : RibbonApplicationMenu
function set ApplicationMenu (value : RibbonApplicationMenu)

Property Value

Type: Microsoft.Windows.Controls.Ribbon.RibbonApplicationMenu
The ribbon Application Menu that is a logical child of this Ribbon control. The registered default is nulla null reference (Nothing in Visual Basic). For more information about what can influence the value, see Dependency Property Value Precedence.

Dependency Property Information

Identifier field

ApplicationMenuProperty

Metadata properties set to true

None

Remarks

You use the ApplicationMenu property to associate a RibbonApplicationMenu object with the Ribbon.

Examples

The following example shows a simple Application Menu attached to a ribbon control. For more examples, see RibbonApplicationMenu.

xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
...
<ribbon:Ribbon >
    <ribbon:Ribbon.ApplicationMenu>
        <ribbon:RibbonApplicationMenu SmallImageSource="Images\SmallIcon.png">
            <ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon"
                                              x:Name="MenuItem1"
                                              ImageSource="Images\LargeIcon.png"/>
        </ribbon:RibbonApplicationMenu>
    </ribbon:Ribbon.ApplicationMenu>
    <ribbon:RibbonTab>
        <!-- Ribbon content goes here. -->
    </ribbon:RibbonTab>
</ribbon:Ribbon >

.NET Framework Security

See Also

Reference

Ribbon Class

Microsoft.Windows.Controls.Ribbon Namespace