次の方法で共有


CommandBarControl.Copy(Object, Object) Method

Definition

Copies this control to the specified position on the specified command bar.

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

Parameters

Bar
Object

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

Before
Object

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

Returns

The copy of the control.

Attributes

Remarks

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

Applies to