Share via


CommandBarControl.Move(Object, Object) Method

Definition

Moves this control to the specified command bar at the specified position.

Microsoft::VisualStudio::CommandBars::CommandBarControl Move(winrt::Windows::Foundation::IInspectable const & Bar, winrt::Windows::Foundation::IInspectable const & Before);
[System.Runtime.InteropServices.DispId(1610874902)]
public Microsoft.VisualStudio.CommandBars.CommandBarControl Move (object Bar, object Before);
[<System.Runtime.InteropServices.DispId(1610874902)>]
abstract member Move : obj * obj -> Microsoft.VisualStudio.CommandBars.CommandBarControl
Public Function Move (Optional Bar As Object, Optional Before As Object) As CommandBarControl

Parameters

Bar
Object

[in, optional] The MsoControlType of the moved control. If this parameter is not specified, the default value is msoControlButton.

Before
Object

[in, optional] An integer representing the index of the moved control. If this parameter is not specified, the new control is added at the end of the target command bar.

Returns

The moved control.

Attributes

Remarks

The collection of controls on the command bar is 1-based.

Applies to