共用方式為


RibbonMenu.Dynamic Property

Definition

Gets or sets a value that indicates whether the menu can be modified at run time.

public:
 property bool Dynamic { bool get(); void set(bool value); };
public bool Dynamic { get; set; }
member this.Dynamic : bool with get, set
Public Property Dynamic As Boolean

Property Value

true if the menu can be modified at run time; otherwise, false. The default is false.

Remarks

Set the Dynamic property to true if you want to add controls to the menu at run time, after the Ribbon is loaded by the Microsoft Office application.

For menus that you add to the Ribbon at design time, the Dynamic property can be set only before the Ribbon loads. For more information, see Ribbon Object Model Overview.

This property can be set at run time only under certain conditions. For more information, see Ribbon Object Model Overview.

Applies to