Share via


IEditorOptions.SetOptionValue Method

Definition

Overloads

SetOptionValue(String, Object)

Sets the value of the specified option in the current scope. If the given option is not applicable in the current scope, it attempts to set the option in the global scope.

SetOptionValue<T>(EditorOptionKey<T>, T)

Sets the value of the specified option in the current scope. If the given option is not applicable in the current scope, it attempts to set the option in the global scope.

SetOptionValue(String, Object)

Sets the value of the specified option in the current scope. If the given option is not applicable in the current scope, it attempts to set the option in the global scope.

public:
 void SetOptionValue(System::String ^ optionId, System::Object ^ value);
public:
 void SetOptionValue(Platform::String ^ optionId, Platform::Object ^ value);
void SetOptionValue(std::wstring const & optionId, winrt::Windows::Foundation::IInspectable const & value);
public void SetOptionValue (string optionId, object value);
abstract member SetOptionValue : string * obj -> unit
Public Sub SetOptionValue (optionId As String, value As Object)

Parameters

optionId
String

The ID of the option.

value
Object

The new value of the option.

Remarks

If the given option is not applicable in the current scope, it attempts to set the option in the global scope.

Applies to

SetOptionValue<T>(EditorOptionKey<T>, T)

Sets the value of the specified option in the current scope. If the given option is not applicable in the current scope, it attempts to set the option in the global scope.

public:
generic <typename T>
 void SetOptionValue(Microsoft::VisualStudio::Text::Editor::EditorOptionKey<T> key, T value);
template <typename T>
 void SetOptionValue(Microsoft::VisualStudio::Text::Editor::EditorOptionKey<T> key, T value);
public void SetOptionValue<T> (Microsoft.VisualStudio.Text.Editor.EditorOptionKey<T> key, T value);
abstract member SetOptionValue : Microsoft.VisualStudio.Text.Editor.EditorOptionKey<'T> * 'T -> unit
Public Sub SetOptionValue(Of T) (key As EditorOptionKey(Of T), value As T)

Type Parameters

T

The type of the key.

Parameters

key
EditorOptionKey<T>

The key of the option.

value
T

The new value of the option.

Remarks

If the given option is not applicable in the current scope, it attempts to set the option in the global scope.

Applies to