ViewFilter.OnSetFocus Method

Called when the specified view gains focus.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

声明
Public Overridable Sub OnSetFocus ( _
    view As IVsTextView _
)
用法
Dim instance As ViewFilter
Dim view As IVsTextView

instance.OnSetFocus(view)
public virtual void OnSetFocus(
    IVsTextView view
)
public:
virtual void OnSetFocus(
    IVsTextView^ view
)
abstract OnSetFocus : 
        view:IVsTextView -> unit 
override OnSetFocus : 
        view:IVsTextView -> unit 
public function OnSetFocus(
    view : IVsTextView
)

Parameters

Implements

IVsTextViewEvents.OnSetFocus(IVsTextView)

Remarks

If your language service needs to respond to a view gaining focus, then you must derive a class from the ViewFilter class and override this method.

This method is an implementation of the OnSetFocus method on the IVsTextViewEvents interface.

The base method calls the OnSetFocus method on the CodeWindowManager object passed to the ViewFilter class constructor (which means you can override the CodeWindowManager class's version of the method if you otherwise do not need to override any method in the ViewFilter class). The base method then calls the OnActiveViewChanged method.

.NET Framework Security

See Also

Reference

ViewFilter Class

ViewFilter Members

Microsoft.VisualStudio.Package Namespace