Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (45 sloc) 3.6 KB
<Type Name="AutomationFocusChangedEventHandler" FullName="System.Windows.Automation.AutomationFocusChangedEventHandler">
<TypeSignature Language="C#" Value="public delegate void AutomationFocusChangedEventHandler(object sender, AutomationFocusChangedEventArgs e);" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed AutomationFocusChangedEventHandler extends System.MulticastDelegate" />
<TypeSignature Language="DocId" Value="T:System.Windows.Automation.AutomationFocusChangedEventHandler" />
<TypeSignature Language="VB.NET" Value="Public Delegate Sub AutomationFocusChangedEventHandler(sender As Object, e As AutomationFocusChangedEventArgs)" />
<TypeSignature Language="C++ CLI" Value="public delegate void AutomationFocusChangedEventHandler(System::Object ^ sender, AutomationFocusChangedEventArgs ^ e);" />
<TypeSignature Language="F#" Value="type AutomationFocusChangedEventHandler = delegate of obj * AutomationFocusChangedEventArgs -&gt; unit" />
<AssemblyInfo>
<AssemblyName>UIAutomationClient</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Parameters>
<Parameter Name="sender" Type="System.Object" />
<Parameter Name="e" Type="System.Windows.Automation.AutomationFocusChangedEventArgs" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Docs>
<param name="sender">The object that raised the event.</param>
<param name="e">Information about the event.</param>
<summary>Represents the method implemented by the UI Automation client application to handle the event raised by a UI Automation provider when the focus has changed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use an <xref:System.Windows.Automation.AutomationFocusChangedEventHandler> delegate to define the method that is called by a client to handle [!INCLUDE[TLA2#tla_uiautomation](~/includes/tla2sharptla-uiautomation-md.md)] focus-changed events.
The <xref:System.Windows.Automation.AutomationElement> represented by `sender` might not have any cached properties or patterns, depending on whether the application subscribed to this event while a <xref:System.Windows.Automation.CacheRequest> was active.
## Examples
The following example implements a delegate to handle focus-changed events.
[!code-csharp[UIAFocusTracker_snip#106](~/samples/snippets/csharp/VS_Snippets_Wpf/UIAFocusTracker_snip/CSharp/FocusTracker.cs#106)]
[!code-vb[UIAFocusTracker_snip#106](~/samples/snippets/visualbasic/VS_Snippets_Wpf/UIAFocusTracker_snip/VisualBasic/FocusTracker.vb#106)]
]]></format>
</remarks>
<altmember cref="M:System.Windows.Automation.Automation.AddAutomationFocusChangedEventHandler(System.Windows.Automation.AutomationFocusChangedEventHandler)" />
<altmember cref="M:System.Windows.Automation.Automation.RemoveAutomationFocusChangedEventHandler(System.Windows.Automation.AutomationFocusChangedEventHandler)" />
<altmember cref="T:System.Windows.Automation.AutomationFocusChangedEventArgs" />
<related type="Article" href="https://msdn.microsoft.com/library/b688effa-b3e8-4b05-944d-05ed89a245aa">Subscribe to UI Automation Events</related>
<related type="Article" href="https://msdn.microsoft.com/library/b909e388-3f24-4997-b6d4-bd9c35c2dc27">UI Automation Events Overview</related>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.5/ms771428(v=vs.90)">TrackFocus Sample</related>
</Docs>
</Type>
You can’t perform that action at this time.