Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1607 lines (1491 sloc) 117 KB
<Type Name="HwndSource" FullName="System.Windows.Interop.HwndSource">
<TypeSignature Language="C#" Value="public class HwndSource : System.Windows.PresentationSource, IDisposable, System.Windows.Interop.IKeyboardInputSink, System.Windows.Interop.IWin32Window" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi HwndSource extends System.Windows.PresentationSource implements class System.IDisposable, class System.Windows.Interop.IKeyboardInputSink, class System.Windows.Interop.IWin32Window" />
<TypeSignature Language="DocId" Value="T:System.Windows.Interop.HwndSource" />
<TypeSignature Language="VB.NET" Value="Public Class HwndSource&#xA;Inherits PresentationSource&#xA;Implements IDisposable, IKeyboardInputSink, IWin32Window" />
<TypeSignature Language="C++ CLI" Value="public ref class HwndSource : System::Windows::PresentationSource, IDisposable, System::Windows::Interop::IKeyboardInputSink, System::Windows::Interop::IWin32Window" />
<TypeSignature Language="F#" Value="type HwndSource = class&#xA; inherit PresentationSource&#xA; interface IDisposable&#xA; interface IWin32Window&#xA; interface IKeyboardInputSink" />
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.PresentationSource</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.Interop.IKeyboardInputSink</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.Interop.IWin32Window</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Presents Windows Presentation Foundation (WPF) content in a Win32 window.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> Many members of this class are unavailable in the Internet security zone.
An <xref:System.Windows.Interop.HwndSource> implements a [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] window that can contain [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] content. The [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] content in the window is arranged, measured, and rendered; and is interactive to input. Because the <xref:System.Windows.Interop.HwndSource> is specifically designed to interoperate with [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)], this class exposes several low-level [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] features. You can use this class to do the following:
- Specify window styles, window class styles, and extended window styles.
- Hook the window procedure.
- Provide access to the window handle (HWND).
- Destroy the window.
The <xref:System.Windows.Interop.HwndSource> class is designed for general interoperability and is not designed as a managed HWND wrapper. In general, it does not provide managed methods for manipulating the window or properties for inspecting its state. Instead, the <xref:System.Windows.Interop.HwndSource> class provides access to the [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] window handle (HWND) through the <xref:System.Windows.Interop.HwndSource.Handle%2A> property, which can be passed by means of PInvoke techniques to [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] [!INCLUDE[TLA2#tla_api#plural](~/includes/tla2sharptla-apisharpplural-md.md)] in order to manipulate the window.
**Construction**
Many aspects of the <xref:System.Windows.Interop.HwndSource> can only be specified at construction time. To create an <xref:System.Windows.Interop.HwndSource>, first create an <xref:System.Windows.Interop.HwndSourceParameters> structure and populate it with the desired parameters. These parameters include the following:
- The class, window, and extended window styles. You must use PInvoke to change the styles after the window is created. Not all styles can be changed after the window is created. Consult the [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] documentation before changing window styles.
- The initial position of the window.
- The initial size of the window, which includes whether the size is specified or should be determined from the determined size of the [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] content.
- The parent window.
- The <xref:System.Windows.Interop.HwndSourceHook> to include in the window procedure chain. If you specify a hook at construction time, it receives all messages for the window. You can use <xref:System.Windows.Interop.HwndSource.AddHook%2A> to add a hook after the window is created.
- The transparency settings. A top-level window can be configured to blend with the other windows on the desktop according to the per-pixel transparency of the [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] content. To enable this, set the <xref:System.Windows.Interop.HwndSourceParameters.UsesPerPixelOpacity%2A> property in the <xref:System.Windows.Interop.HwndSourceParameters> to `true`. This property can only be specified at construction time, and only through the <xref:System.Windows.Interop.HwndSource.%23ctor%28System.Windows.Interop.HwndSourceParameters%29> constructor signature, and it imposes several limitations.
After you populate the <xref:System.Windows.Interop.HwndSourceParameters> structure, pass it to the <xref:System.Windows.Interop.HwndSource.%23ctor%28System.Windows.Interop.HwndSourceParameters%29> constructor for the <xref:System.Windows.Interop.HwndSource>.
**Object Lifetime**
An <xref:System.Windows.Interop.HwndSource> is a regular [!INCLUDE[TLA#tla_clr](~/includes/tlasharptla-clr-md.md)] object, and its lifetime is managed by the garbage collector. Because the <xref:System.Windows.Interop.HwndSource> represents an unmanaged resource, <xref:System.Windows.Interop.HwndSource> implements <xref:System.IDisposable>. Synchronously calling <xref:System.Windows.Interop.HwndSource.Dispose%2A> immediately destroys the [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] window if called from the owner thread. If called from another thread, the [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] window is destroyed asynchronously. Calling <xref:System.Windows.Interop.HwndSource.Dispose%2A> explicitly from the interoperating code might be necessary for certain interoperation scenarios.
**Window Procedures**
The <xref:System.Windows.Interop.HwndSource> class implements its own window procedure. This window procedure is used to process important window messages, such as those related to layout, rendering, and input. However, you can also hook the window procedure for your own use. You can specify your own hook during construction by setting the <xref:System.Windows.Interop.HwndSourceParameters.HwndSourceHook%2A?displayProperty=nameWithType> property, or you can also use <xref:System.Windows.Interop.HwndSource.AddHook%2A> and <xref:System.Windows.Interop.HwndSource.RemoveHook%2A> to add and remove hooks after the window is created. The hooks are called by last-in first-out order, which enables your hooks to execute before the built-in processing. The actual hooks are held by a weak reference. Therefore, make sure that you manage the lifetime of your hook delegate.
For more information about <xref:System.Windows.Interop.HwndSource> and other interoperation classes, see [WPF and Win32 Interoperation](~/docs/framework/wpf/advanced/wpf-and-win32-interoperation.md).
Notice how the constructors for <xref:System.Windows.Interop.HwndSource> take parameters that resemble the parameters for [!INCLUDE[TLA#tla_win32](~/includes/tlasharptla-win32-md.md)] functions such as [CreateWindowEx](https://go.microsoft.com/fwlink/?LinkID=98462).
Scale transformations should not be applied to the <xref:System.Windows.Interop.HwndSource.RootVisual%2A> of an <xref:System.Windows.Interop.HwndSource>. See Remarks for <xref:System.Windows.Interop.HwndSource.RootVisual%2A>.
]]></format>
</remarks>
<altmember cref="T:System.Windows.Interop.HwndHost" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Interop.HwndSource" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HwndSource (System.Windows.Interop.HwndSourceParameters parameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Windows.Interop.HwndSourceParameters parameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.#ctor(System.Windows.Interop.HwndSourceParameters)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (parameters As HwndSourceParameters)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HwndSource(System::Windows::Interop::HwndSourceParameters parameters);" />
<MemberSignature Language="F#" Value="new System.Windows.Interop.HwndSource : System.Windows.Interop.HwndSourceParameters -&gt; System.Windows.Interop.HwndSource" Usage="new System.Windows.Interop.HwndSource parameters" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="parameters" Type="System.Windows.Interop.HwndSourceParameters" />
</Parameters>
<Docs>
<param name="parameters">A structure that contains the parameters that are required to create the window.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Interop.HwndSource" /> class by using a structure that contains the initial settings.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone.
This constructor signature might be more convenient in certain situations, because the default structure contains some appropriate initial default values.
> [!IMPORTANT]
> If you use this signature, do not use the default <xref:System.Windows.Interop.HwndSourceParameters> constructor to construct the <xref:System.Windows.Interop.HwndSourceParameters> structure for the `parameters` value. You must use the <xref:System.Windows.Interop.HwndSourceParameters> constructor that enables you to specify an initial window name. If you use the default <xref:System.Windows.Interop.HwndSourceParameters> constructor and create an <xref:System.Windows.Interop.HwndSource> with it, that <xref:System.Windows.Interop.HwndSource> does not display because an initial window name is a construction requirement for the represented HWND.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to create instances of this class. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HwndSource (int classStyle, int style, int exStyle, int x, int y, string name, IntPtr parent);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 classStyle, int32 style, int32 exStyle, int32 x, int32 y, string name, native int parent) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.#ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.String,System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (classStyle As Integer, style As Integer, exStyle As Integer, x As Integer, y As Integer, name As String, parent As IntPtr)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HwndSource(int classStyle, int style, int exStyle, int x, int y, System::String ^ name, IntPtr parent);" />
<MemberSignature Language="F#" Value="new System.Windows.Interop.HwndSource : int * int * int * int * int * string * nativeint -&gt; System.Windows.Interop.HwndSource" Usage="new System.Windows.Interop.HwndSource (classStyle, style, exStyle, x, y, name, parent)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="classStyle" Type="System.Int32" />
<Parameter Name="style" Type="System.Int32" />
<Parameter Name="exStyle" Type="System.Int32" />
<Parameter Name="x" Type="System.Int32" />
<Parameter Name="y" Type="System.Int32" />
<Parameter Name="name" Type="System.String" />
<Parameter Name="parent" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="classStyle">The [!INCLUDE[TLA#tla_win32](~/includes/tlasharptla-win32-md.md)] class styles for the window.</param>
<param name="style">The [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] styles for the window.</param>
<param name="exStyle">The extended [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] styles for the window.</param>
<param name="x">The position of the window's left edge.</param>
<param name="y">The position of the window's upper edge.</param>
<param name="name">The name of the window.</param>
<param name="parent">The handle of the window's parent window.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Interop.HwndSource" /> class with a specified class style, style, extended style, x-y position, name, and parent window.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to create instances of this class. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HwndSource (int classStyle, int style, int exStyle, int x, int y, int width, int height, string name, IntPtr parent);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 classStyle, int32 style, int32 exStyle, int32 x, int32 y, int32 width, int32 height, string name, native int parent) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.#ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.String,System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (classStyle As Integer, style As Integer, exStyle As Integer, x As Integer, y As Integer, width As Integer, height As Integer, name As String, parent As IntPtr)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HwndSource(int classStyle, int style, int exStyle, int x, int y, int width, int height, System::String ^ name, IntPtr parent);" />
<MemberSignature Language="F#" Value="new System.Windows.Interop.HwndSource : int * int * int * int * int * int * int * string * nativeint -&gt; System.Windows.Interop.HwndSource" Usage="new System.Windows.Interop.HwndSource (classStyle, style, exStyle, x, y, width, height, name, parent)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="classStyle" Type="System.Int32" />
<Parameter Name="style" Type="System.Int32" />
<Parameter Name="exStyle" Type="System.Int32" />
<Parameter Name="x" Type="System.Int32" />
<Parameter Name="y" Type="System.Int32" />
<Parameter Name="width" Type="System.Int32" />
<Parameter Name="height" Type="System.Int32" />
<Parameter Name="name" Type="System.String" />
<Parameter Name="parent" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="classStyle">The [!INCLUDE[TLA#tla_win32](~/includes/tlasharptla-win32-md.md)] class styles for the window.</param>
<param name="style">The [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] styles for the window.</param>
<param name="exStyle">The extended [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] styles for the window.</param>
<param name="x">The position of the window's left edge.</param>
<param name="y">The position of the window's upper edge.</param>
<param name="width">The width of the window.</param>
<param name="height">The height of the window.</param>
<param name="name">The name of the window.</param>
<param name="parent">The handle of the window's parent window.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Interop.HwndSource" /> class with a specified class style, style, extended style, x-y position, width, height, name, and parent window.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to create instances of this class. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HwndSource (int classStyle, int style, int exStyle, int x, int y, int width, int height, string name, IntPtr parent, bool adjustSizingForNonClientArea);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 classStyle, int32 style, int32 exStyle, int32 x, int32 y, int32 width, int32 height, string name, native int parent, bool adjustSizingForNonClientArea) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.#ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.Int32,System.String,System.IntPtr,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (classStyle As Integer, style As Integer, exStyle As Integer, x As Integer, y As Integer, width As Integer, height As Integer, name As String, parent As IntPtr, adjustSizingForNonClientArea As Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HwndSource(int classStyle, int style, int exStyle, int x, int y, int width, int height, System::String ^ name, IntPtr parent, bool adjustSizingForNonClientArea);" />
<MemberSignature Language="F#" Value="new System.Windows.Interop.HwndSource : int * int * int * int * int * int * int * string * nativeint * bool -&gt; System.Windows.Interop.HwndSource" Usage="new System.Windows.Interop.HwndSource (classStyle, style, exStyle, x, y, width, height, name, parent, adjustSizingForNonClientArea)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="classStyle" Type="System.Int32" />
<Parameter Name="style" Type="System.Int32" />
<Parameter Name="exStyle" Type="System.Int32" />
<Parameter Name="x" Type="System.Int32" />
<Parameter Name="y" Type="System.Int32" />
<Parameter Name="width" Type="System.Int32" />
<Parameter Name="height" Type="System.Int32" />
<Parameter Name="name" Type="System.String" />
<Parameter Name="parent" Type="System.IntPtr" />
<Parameter Name="adjustSizingForNonClientArea" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="classStyle">The [!INCLUDE[TLA#tla_win32](~/includes/tlasharptla-win32-md.md)] class styles for the window.</param>
<param name="style">The [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] styles for the window.</param>
<param name="exStyle">The extended [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] styles for the window.</param>
<param name="x">The position of the window's left edge.</param>
<param name="y">The position of the window's upper edge.</param>
<param name="width">The width of the window.</param>
<param name="height">The height of the window.</param>
<param name="name">The name of the window.</param>
<param name="parent">The handle of the window's parent window.</param>
<param name="adjustSizingForNonClientArea">
<see langword="true" /> to have the layout manager include the non-client area for sizing; otherwise, <see langword="false" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Interop.HwndSource" /> class with a specified class style, style, extended style, x-y position, width, height, name, and parent window, and by specifying whether the window is autosized.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to create instances of this class. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
</Docs>
</Member>
<Member MemberName="AcquireHwndFocusInMenuMode">
<MemberSignature Language="C#" Value="public bool AcquireHwndFocusInMenuMode { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AcquireHwndFocusInMenuMode" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.AcquireHwndFocusInMenuMode" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AcquireHwndFocusInMenuMode As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool AcquireHwndFocusInMenuMode { bool get(); };" />
<MemberSignature Language="F#" Value="member this.AcquireHwndFocusInMenuMode : bool" Usage="System.Windows.Interop.HwndSource.AcquireHwndFocusInMenuMode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the value that determines whether to acquire Win32 focus for the WPF containing window for this <see cref="T:System.Windows.Interop.HwndSource" />.</summary>
<value>
<see langword="true" /> to acquire Win32 focus for the WPF containing window when the user interacts with menus; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This value is set when you create the <xref:System.Windows.Interop.HwndSource> by setting the <xref:System.Windows.Interop.HwndSourceParameters.AcquireHwndFocusInMenuMode%2A> parameter.
The default value is determined by the <xref:System.Windows.Interop.HwndSource.DefaultAcquireHwndFocusInMenuMode%2A> property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AddHook">
<MemberSignature Language="C#" Value="public void AddHook (System.Windows.Interop.HwndSourceHook hook);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddHook(class System.Windows.Interop.HwndSourceHook hook) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.AddHook(System.Windows.Interop.HwndSourceHook)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddHook (hook As HwndSourceHook)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void AddHook(System::Windows::Interop::HwndSourceHook ^ hook);" />
<MemberSignature Language="F#" Value="member this.AddHook : System.Windows.Interop.HwndSourceHook -&gt; unit" Usage="hwndSource.AddHook hook" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="hook" Type="System.Windows.Interop.HwndSourceHook" />
</Parameters>
<Docs>
<param name="hook">The handler implementation (based on the <see cref="T:System.Windows.Interop.HwndSourceHook" /> delegate) that receives the window messages.</param>
<summary>Adds an event handler that receives all window messages.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone.
Most [!INCLUDE[TLA#tla_win32](~/includes/tlasharptla-win32-md.md)] messages that reach the <xref:System.Windows.Interop.HwndSource> have an approximate [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] equivalent. You use <xref:System.Windows.Interop.HwndSource.AddHook%2A> to handle the cases where the message has no [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] equivalent.
The <xref:System.Windows.Interop.HwndSourceHook> delegate resembles the parameter profile of a [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] main window procedure. All window messages that the main window procedure of the <xref:System.Windows.Interop.HwndSource> parent window receives are also forwarded to the <xref:System.Windows.Interop.HwndSourceHook> delegates.
Hooks are called in the order that they were added. If any hook returns `handled`=`true` for a message, the hooks after it in the call order are not called for that message.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to add handling. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
<altmember cref="T:System.Windows.Interop.HwndSourceHook" />
<altmember cref="M:System.Windows.Interop.HwndSource.RemoveHook(System.Windows.Interop.HwndSourceHook)" />
</Docs>
</Member>
<Member MemberName="AutoResized">
<MemberSignature Language="C#" Value="public event System.Windows.AutoResizedEventHandler AutoResized;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.AutoResizedEventHandler AutoResized" />
<MemberSignature Language="DocId" Value="E:System.Windows.Interop.HwndSource.AutoResized" />
<MemberSignature Language="VB.NET" Value="Public Event AutoResized As AutoResizedEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::AutoResizedEventHandler ^ AutoResized;" />
<MemberSignature Language="F#" Value="member this.AutoResized : System.Windows.AutoResizedEventHandler " Usage="member this.AutoResized : System.Windows.AutoResizedEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.AutoResizedEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when layout causes the <see cref="T:System.Windows.Interop.HwndSource" /> to automatically resize.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The native behavior of <xref:System.Windows.Interop.HwndSource> is to automatically resize content and the window region based on changes reported through the [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] layout system. The window does not resize if it is currently minimized or if <xref:System.Windows.Interop.HwndSource.SizeToContent%2A> is set to <xref:System.Windows.SizeToContent.Manual>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ChildKeyboardInputSinks">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IEnumerable&lt;System.Windows.Interop.IKeyboardInputSink&gt; ChildKeyboardInputSinks { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IEnumerable`1&lt;class System.Windows.Interop.IKeyboardInputSink&gt; ChildKeyboardInputSinks" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.ChildKeyboardInputSinks" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ChildKeyboardInputSinks As IEnumerable(Of IKeyboardInputSink)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::Generic::IEnumerable&lt;System::Windows::Interop::IKeyboardInputSink ^&gt; ^ ChildKeyboardInputSinks { System::Collections::Generic::IEnumerable&lt;System::Windows::Interop::IKeyboardInputSink ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ChildKeyboardInputSinks : seq&lt;System.Windows.Interop.IKeyboardInputSink&gt;" Usage="System.Windows.Interop.HwndSource.ChildKeyboardInputSinks" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2">
<AttributeName>get: System.Runtime.CompilerServices.IteratorStateMachine(typeof(System.Windows.Interop.HwndSource/&lt;get_ChildKeyboardInputSinks&gt;d__29))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.6">
<AttributeName>get: System.Runtime.CompilerServices.IteratorStateMachine(typeof(System.Windows.Interop.HwndSource/&lt;get_ChildKeyboardInputSinks&gt;d__1))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.6.1">
<AttributeName>get: System.Runtime.CompilerServices.IteratorStateMachine(typeof(System.Windows.Interop.HwndSource/&lt;get_ChildKeyboardInputSinks&gt;d__24))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.8;netcore-3.0">
<AttributeName>get: System.Runtime.CompilerServices.IteratorStateMachine(typeof(System.Windows.Interop.HwndSource/&lt;get_ChildKeyboardInputSinks&gt;d__31))</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Collections.Generic.IEnumerable&lt;System.Windows.Interop.IKeyboardInputSink&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a sequence of registered input sinks.</summary>
<value>An enumeration of keyboard input sinks.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CompositionTarget">
<MemberSignature Language="C#" Value="public System.Windows.Interop.HwndTarget CompositionTarget { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Interop.HwndTarget CompositionTarget" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.CompositionTarget" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CompositionTarget As HwndTarget" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Interop::HwndTarget ^ CompositionTarget { System::Windows::Interop::HwndTarget ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CompositionTarget : System.Windows.Interop.HwndTarget" Usage="System.Windows.Interop.HwndSource.CompositionTarget" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>get: System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Interop.HwndTarget</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the visual manager for the hosted window.</summary>
<value>The visual manager.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Override <xref:System.Windows.Interop.HwndSource.GetCompositionTargetCore%2A> in order to override the value that <xref:System.Windows.Interop.HwndSource.CompositionTarget%2A> returns.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CreateHandleRef">
<MemberSignature Language="C#" Value="public System.Runtime.InteropServices.HandleRef CreateHandleRef ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Runtime.InteropServices.HandleRef CreateHandleRef() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.CreateHandleRef" />
<MemberSignature Language="VB.NET" Value="Public Function CreateHandleRef () As HandleRef" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Runtime::InteropServices::HandleRef CreateHandleRef();" />
<MemberSignature Language="F#" Value="member this.CreateHandleRef : unit -&gt; System.Runtime.InteropServices.HandleRef" Usage="hwndSource.CreateHandleRef " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Runtime.InteropServices.HandleRef</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the window handle for the <see cref="T:System.Windows.Interop.HwndSource" />. The window handle is packaged as part of a <see cref="T:System.Runtime.InteropServices.HandleRef" /> structure.</summary>
<returns>A structure that contains the window handle for this <see cref="T:System.Windows.Interop.HwndSource" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use the handle that is obtained from <xref:System.Windows.Interop.HwndSource.CreateHandleRef%2A> to reference the <xref:System.Windows.Interop.HwndSource> from [!INCLUDE[TLA2#tla_win32](~/includes/tla2sharptla-win32-md.md)] code. Use the handle for operations such as message handling and window behavior.
To get just the handle, use <xref:System.Windows.Interop.HwndSource.Handle%2A>.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Interop.HwndSource.Handle" />
</Docs>
</Member>
<Member MemberName="DefaultAcquireHwndFocusInMenuMode">
<MemberSignature Language="C#" Value="public static bool DefaultAcquireHwndFocusInMenuMode { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property bool DefaultAcquireHwndFocusInMenuMode" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.DefaultAcquireHwndFocusInMenuMode" />
<MemberSignature Language="VB.NET" Value="Public Shared Property DefaultAcquireHwndFocusInMenuMode As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static property bool DefaultAcquireHwndFocusInMenuMode { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.DefaultAcquireHwndFocusInMenuMode : bool with get, set" Usage="System.Windows.Interop.HwndSource.DefaultAcquireHwndFocusInMenuMode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the default <see cref="P:System.Windows.Interop.HwndSource.AcquireHwndFocusInMenuMode" /> value for new instances of <see cref="T:System.Windows.Interop.HwndSource" />.</summary>
<value>
<see langword="true" /> to acquire Win32 focus for the WPF containing window when the user interacts with menus; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
New instances of <xref:System.Windows.Interop.HwndSource> have <xref:System.Windows.Interop.HwndSource.AcquireHwndFocusInMenuMode%2A> set to this default value, unless a different value is passed as a parameter to the <xref:System.Windows.Interop.HwndSource> constructor for a specific instance, by using the <xref:System.Windows.Interop.HwndSourceParameters.AcquireHwndFocusInMenuMode%2A> property.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.EnvironmentPermission">to get this property. Associated enumeration: <see cref="F:System.Security.Permissions.PermissionState.Unrestricted" /></permission>
<altmember cref="P:System.Windows.Interop.HwndSourceParameters.AcquireHwndFocusInMenuMode" />
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="hwndSource.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases all managed resources that are used by the <see cref="T:System.Windows.Interop.HwndSource" />, and raises the <see cref="E:System.Windows.Interop.HwndSource.Disposed" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone.
<xref:System.Windows.Interop.HwndSource.Dispose%2A> initiates related cleanup work for the HWND. If <xref:System.Windows.Interop.HwndSource.Dispose%2A> is called through a thread that is different from the main UI thread, the cleanup work may be deferred until it can be posted to the main UI thread.
Calling <xref:System.Windows.Interop.HwndSource.Dispose%2A> explicitly from the interoperating code might be necessary for certain interoperation scenarios, because an <xref:System.Windows.Interop.HwndSource> in some interoperation scenarios can generate several references to it across the interoperation boundaries that might prevent timely garbage collection.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Interop.HwndSource.IsDisposed" />
</Docs>
</Member>
<Member MemberName="Disposed">
<MemberSignature Language="C#" Value="public event EventHandler Disposed;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler Disposed" />
<MemberSignature Language="DocId" Value="E:System.Windows.Interop.HwndSource.Disposed" />
<MemberSignature Language="VB.NET" Value="Public Event Disposed As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ Disposed;" />
<MemberSignature Language="F#" Value="member this.Disposed : EventHandler " Usage="member this.Disposed : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="M:System.Windows.Interop.HwndSource.Dispose" /> method is called on this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Interop.HwndSource.Disposed> event is raised before any resources are released by the <xref:System.Windows.Interop.HwndSource>. The <xref:System.Windows.Interop.HwndSource.Disposed> event indicates that the object that raises the event is about to have all references to it removed.
Use <xref:System.Windows.Interop.HwndSource.Disposed> and the <xref:System.Windows.Interop.HwndSource.IsDisposed%2A> property to avoid calling <xref:System.Windows.Interop.HwndSource.Dispose%2A> twice (which raises an exception).
]]></format>
</remarks>
<altmember cref="M:System.Windows.Interop.HwndSource.Dispose" />
</Docs>
</Member>
<Member MemberName="DpiChanged">
<MemberSignature Language="C#" Value="public event System.Windows.HwndDpiChangedEventHandler DpiChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.HwndDpiChangedEventHandler DpiChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Interop.HwndSource.DpiChanged" />
<MemberSignature Language="VB.NET" Value="Public Event DpiChanged As HwndDpiChangedEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event System::Windows::HwndDpiChangedEventHandler ^ DpiChanged;" />
<MemberSignature Language="F#" Value="member this.DpiChanged : System.Windows.HwndDpiChangedEventHandler " Usage="member this.DpiChanged : System.Windows.HwndDpiChangedEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.HwndDpiChangedEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the DPI of the monitor of this Hwnd has changed, or the Hwnd is moved to a monitor with a different DPI.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FromHwnd">
<MemberSignature Language="C#" Value="public static System.Windows.Interop.HwndSource FromHwnd (IntPtr hwnd);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Windows.Interop.HwndSource FromHwnd(native int hwnd) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.FromHwnd(System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromHwnd (hwnd As IntPtr) As HwndSource" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Windows::Interop::HwndSource ^ FromHwnd(IntPtr hwnd);" />
<MemberSignature Language="F#" Value="static member FromHwnd : nativeint -&gt; System.Windows.Interop.HwndSource" Usage="System.Windows.Interop.HwndSource.FromHwnd hwnd" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Interop.HwndSource</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="hwnd" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="hwnd">The provided window handle.</param>
<summary>Returns the <see cref="T:System.Windows.Interop.HwndSource" /> object of the specified window.</summary>
<returns>The <see cref="T:System.Windows.Interop.HwndSource" /> object for the window that is specified by the <paramref name="hwnd" /> window handle.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone, or for partial trust in general.
You can use this method to return an <xref:System.Windows.Interop.HwndSource> for a window that is not explicitly an interoperation window. The procedure for this is:
1. Create a <xref:System.Windows.Interop.WindowInteropHelper> instance (providing the main <xref:System.Windows.Window> as a constructor parameter).
2. Get the value of the <xref:System.Windows.Interop.WindowInteropHelper.Handle%2A> property from that <xref:System.Windows.Interop.WindowInteropHelper> instance.
3. Pass that HWND value as a parameter to <xref:System.Windows.Interop.HwndSource.FromHwnd%2A>.
This technique can be useful if you then want to add general <xref:System.Windows.Interop.HwndSource.AddHook%2A> message processing to the window. However, whenever you create an <xref:System.Windows.Interop.HwndSource>, you are also responsible for destroying it. This is true even if the <xref:System.Windows.Application> object for an application <xref:System.Windows.Interop.HwndSource> is disposed. For more information, see Remarks on <xref:System.Windows.Interop.HwndSource>.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to call this method. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
<altmember cref="T:System.Windows.Interop.WindowInteropHelper" />
</Docs>
</Member>
<Member MemberName="GetCompositionTargetCore">
<MemberSignature Language="C#" Value="protected override System.Windows.Media.CompositionTarget GetCompositionTargetCore ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance class System.Windows.Media.CompositionTarget GetCompositionTargetCore() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.GetCompositionTargetCore" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function GetCompositionTargetCore () As CompositionTarget" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override System::Windows::Media::CompositionTarget ^ GetCompositionTargetCore();" />
<MemberSignature Language="F#" Value="override this.GetCompositionTargetCore : unit -&gt; System.Windows.Media.CompositionTarget" Usage="hwndSource.GetCompositionTargetCore " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Media.CompositionTarget</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the visual target of the window.</summary>
<returns>Returns the visual target of the window.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default implementation returns the same result as <xref:System.Windows.Interop.HwndSource.CompositionTarget%2A>.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>Implement this method to return a type-specific visual target. <see cref="T:System.Windows.Interop.HwndSource" /> implements this method to return <see cref="T:System.Windows.Interop.HwndTarget" />.</para>
</block>
<altmember cref="T:System.Windows.Media.CompositionTarget" />
<altmember cref="P:System.Windows.Interop.HwndSource.CompositionTarget" />
</Docs>
</Member>
<Member MemberName="Handle">
<MemberSignature Language="C#" Value="public IntPtr Handle { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int Handle" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.Handle" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Handle As IntPtr" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property IntPtr Handle { IntPtr get(); };" />
<MemberSignature Language="F#" Value="member this.Handle : nativeint" Usage="System.Windows.Interop.HwndSource.Handle" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Windows.Interop.IWin32Window.Handle</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>get: System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the window handle for this <see cref="T:System.Windows.Interop.HwndSource" />.</summary>
<value>The window handle.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This property is not available in the Internet security zone.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to access this pointer. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
</Docs>
</Member>
<Member MemberName="HasFocusWithinCore">
<MemberSignature Language="C#" Value="protected virtual bool HasFocusWithinCore ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance bool HasFocusWithinCore() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.HasFocusWithinCore" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function HasFocusWithinCore () As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual bool HasFocusWithinCore();" />
<MemberSignature Language="F#" Value="abstract member HasFocusWithinCore : unit -&gt; bool&#xA;override this.HasFocusWithinCore : unit -&gt; bool" Usage="hwndSource.HasFocusWithinCore " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a value that indicates whether the sink or one of its contained components has focus.</summary>
<returns>
<see langword="true" /> if the sink or one of its contained components has focus; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Interop.IKeyboardInputSink.HasFocusWithin" />
</Docs>
</Member>
<Member MemberName="IsDisposed">
<MemberSignature Language="C#" Value="public override bool IsDisposed { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsDisposed" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.IsDisposed" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property IsDisposed As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool IsDisposed { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsDisposed : bool" Usage="System.Windows.Interop.HwndSource.IsDisposed" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether <see cref="M:System.Windows.Interop.HwndSource.Dispose" /> has been called on this <see cref="T:System.Windows.Interop.HwndSource" />.</summary>
<value>
<see langword="true" /> if the object has had <see cref="M:System.Windows.Interop.HwndSource.Dispose" /> called on it; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Interop.HwndSource.Dispose%2A> initiates related cleanup work for the HWND. If <xref:System.Windows.Interop.HwndSource.Dispose%2A> is called through a thread that is different from the main UI thread, the cleanup work may be deferred until it can be posted to the main UI thread. The <xref:System.Windows.Interop.HwndSource.Disposed> event is raised and the value of <xref:System.Windows.Interop.HwndSource.IsDisposed%2A> becomes `false` as soon as <xref:System.Windows.Interop.HwndSource.Dispose%2A> is called. During this time, if you call <xref:System.Windows.Interop.HwndSource.Dispose%2A> again, <xref:System.Windows.Interop.HwndSource.Dispose%2A> raises an exception.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Interop.HwndSource.Dispose" />
</Docs>
</Member>
<Member MemberName="KeyboardInputSiteCore">
<MemberSignature Language="C#" Value="protected System.Windows.Interop.IKeyboardInputSite KeyboardInputSiteCore { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Interop.IKeyboardInputSite KeyboardInputSiteCore" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.KeyboardInputSiteCore" />
<MemberSignature Language="VB.NET" Value="Protected Property KeyboardInputSiteCore As IKeyboardInputSite" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property System::Windows::Interop::IKeyboardInputSite ^ KeyboardInputSiteCore { System::Windows::Interop::IKeyboardInputSite ^ get(); void set(System::Windows::Interop::IKeyboardInputSite ^ value); };" />
<MemberSignature Language="F#" Value="member this.KeyboardInputSiteCore : System.Windows.Interop.IKeyboardInputSite with get, set" Usage="System.Windows.Interop.HwndSource.KeyboardInputSiteCore" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>get: System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>set: System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Interop.IKeyboardInputSite</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a reference to the component's container's <see cref="T:System.Windows.Interop.IKeyboardInputSite" /> interface.</summary>
<value>A reference to the container's <see cref="T:System.Windows.Interop.IKeyboardInputSite" /> interface; or <see langword="null" /> if no site is assigned. The default is <see langword="null" />.</value>
<remarks>To be added.</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to set this property. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
<altmember cref="P:System.Windows.Interop.IKeyboardInputSink.KeyboardInputSite" />
</Docs>
</Member>
<Member MemberName="OnDpiChanged">
<MemberSignature Language="C#" Value="protected virtual void OnDpiChanged (System.Windows.HwndDpiChangedEventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnDpiChanged(class System.Windows.HwndDpiChangedEventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.OnDpiChanged(System.Windows.HwndDpiChangedEventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnDpiChanged (e As HwndDpiChangedEventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnDpiChanged(System::Windows::HwndDpiChangedEventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnDpiChanged : System.Windows.HwndDpiChangedEventArgs -&gt; unit&#xA;override this.OnDpiChanged : System.Windows.HwndDpiChangedEventArgs -&gt; unit" Usage="hwndSource.OnDpiChanged e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecuritySafeCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.Windows.HwndDpiChangedEventArgs" Index="0" FrameworkAlternate="netcore-3.0;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="e">The event arguments</param>
<summary>Called when the DPI is going to change for the window.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the user handles this event, WPF does not scale any visuals.
> [!IMPORTANT]
> This method accesses critical data <xref:System.Windows.Interop.HwndTarget>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="OnMnemonicCore">
<MemberSignature Language="C#" Value="protected virtual bool OnMnemonicCore (ref System.Windows.Interop.MSG msg, System.Windows.Input.ModifierKeys modifiers);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance bool OnMnemonicCore(valuetype System.Windows.Interop.MSG&amp; msg, valuetype System.Windows.Input.ModifierKeys modifiers) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.OnMnemonicCore(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function OnMnemonicCore (ByRef msg As MSG, modifiers As ModifierKeys) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual bool OnMnemonicCore(System::Windows::Interop::MSG % msg, System::Windows::Input::ModifierKeys modifiers);" />
<MemberSignature Language="F#" Value="abstract member OnMnemonicCore : * System.Windows.Input.ModifierKeys -&gt; bool&#xA;override this.OnMnemonicCore : * System.Windows.Input.ModifierKeys -&gt; bool" Usage="hwndSource.OnMnemonicCore (msg, modifiers)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msg" Type="System.Windows.Interop.MSG" RefType="ref" Index="0" FrameworkAlternate="netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="modifiers" Type="System.Windows.Input.ModifierKeys" Index="1" FrameworkAlternate="netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="msg">The message for the mnemonic and associated data.</param>
<param name="modifiers">Modifier keys.</param>
<summary>Called when one of the mnemonics (access keys) for this sink is invoked.</summary>
<returns>
<see langword="true" /> if the message was handled; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="msg" /> is not WM_KEYDOWN, WM_SYSKEYDOWN, WM_CHAR, or WM_DEADCHAR.</exception>
<permission cref="T:System.Security.Permissions.UIPermission">to call this method. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
<altmember cref="M:System.Windows.Interop.IKeyboardInputSink.OnMnemonic(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />
</Docs>
</Member>
<Member MemberName="RegisterKeyboardInputSinkCore">
<MemberSignature Language="C#" Value="protected System.Windows.Interop.IKeyboardInputSite RegisterKeyboardInputSinkCore (System.Windows.Interop.IKeyboardInputSink sink);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance class System.Windows.Interop.IKeyboardInputSite RegisterKeyboardInputSinkCore(class System.Windows.Interop.IKeyboardInputSink sink) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.RegisterKeyboardInputSinkCore(System.Windows.Interop.IKeyboardInputSink)" />
<MemberSignature Language="VB.NET" Value="Protected Function RegisterKeyboardInputSinkCore (sink As IKeyboardInputSink) As IKeyboardInputSite" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; System::Windows::Interop::IKeyboardInputSite ^ RegisterKeyboardInputSinkCore(System::Windows::Interop::IKeyboardInputSink ^ sink);" />
<MemberSignature Language="F#" Value="member this.RegisterKeyboardInputSinkCore : System.Windows.Interop.IKeyboardInputSink -&gt; System.Windows.Interop.IKeyboardInputSite" Usage="hwndSource.RegisterKeyboardInputSinkCore sink" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Interop.IKeyboardInputSite</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sink" Type="System.Windows.Interop.IKeyboardInputSink" Index="0" FrameworkAlternate="netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="sink">The <see cref="T:System.Windows.Interop.IKeyboardInputSink" /> sink of the contained component.</param>
<summary>Registers the <see cref="T:System.Windows.Interop.IKeyboardInputSink" /> interface of a contained component.</summary>
<returns>The <see cref="T:System.Windows.Interop.IKeyboardInputSite" /> site of the contained component.</returns>
<remarks>To be added.</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to call this method. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
<altmember cref="M:System.Windows.Interop.IKeyboardInputSink.RegisterKeyboardInputSink(System.Windows.Interop.IKeyboardInputSink)" />
</Docs>
</Member>
<Member MemberName="RemoveHook">
<MemberSignature Language="C#" Value="public void RemoveHook (System.Windows.Interop.HwndSourceHook hook);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RemoveHook(class System.Windows.Interop.HwndSourceHook hook) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.RemoveHook(System.Windows.Interop.HwndSourceHook)" />
<MemberSignature Language="VB.NET" Value="Public Sub RemoveHook (hook As HwndSourceHook)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void RemoveHook(System::Windows::Interop::HwndSourceHook ^ hook);" />
<MemberSignature Language="F#" Value="member this.RemoveHook : System.Windows.Interop.HwndSourceHook -&gt; unit" Usage="hwndSource.RemoveHook hook" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="hook" Type="System.Windows.Interop.HwndSourceHook" />
</Parameters>
<Docs>
<param name="hook">The event handler to remove.</param>
<summary>Removes the event handlers that were added by <see cref="M:System.Windows.Interop.HwndSource.AddHook(System.Windows.Interop.HwndSourceHook)" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!IMPORTANT]
> This method is not available in the Internet security zone.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to remove handlers. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
<altmember cref="M:System.Windows.Interop.HwndSource.AddHook(System.Windows.Interop.HwndSourceHook)" />
<altmember cref="T:System.Windows.Interop.HwndSourceHook" />
</Docs>
</Member>
<Member MemberName="RestoreFocusMode">
<MemberSignature Language="C#" Value="public System.Windows.Input.RestoreFocusMode RestoreFocusMode { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.Input.RestoreFocusMode RestoreFocusMode" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.RestoreFocusMode" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property RestoreFocusMode As RestoreFocusMode" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::Input::RestoreFocusMode RestoreFocusMode { System::Windows::Input::RestoreFocusMode get(); };" />
<MemberSignature Language="F#" Value="member this.RestoreFocusMode : System.Windows.Input.RestoreFocusMode" Usage="System.Windows.Interop.HwndSource.RestoreFocusMode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Input.RestoreFocusMode</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Windows.Input.RestoreFocusMode" /> for the window.</summary>
<value>The <see cref="T:System.Windows.Input.RestoreFocusMode" /> for the window.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property can be set only in the <xref:System.Windows.Interop.HwndSource.%23ctor%28System.Windows.Interop.HwndSourceParameters%29?displayProperty=nameWithType> constructor by using the <xref:System.Windows.Interop.HwndSourceParameters.RestoreFocusMode%2A?displayProperty=nameWithType> property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="RootVisual">
<MemberSignature Language="C#" Value="public override System.Windows.Media.Visual RootVisual { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Media.Visual RootVisual" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.RootVisual" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property RootVisual As Visual" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Windows::Media::Visual ^ RootVisual { System::Windows::Media::Visual ^ get(); void set(System::Windows::Media::Visual ^ value); };" />
<MemberSignature Language="F#" Value="member this.RootVisual : System.Windows.Media.Visual with get, set" Usage="System.Windows.Interop.HwndSource.RootVisual" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>get: System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>set: System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Media.Visual</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="P:System.Windows.Media.CompositionTarget.RootVisual" /> of the window.</summary>
<value>The root visual object of the window.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this property to connect a <xref:System.Windows.Controls.Page> or another root visual to the <xref:System.Windows.Interop.HwndSource>.
Scale transformations should not be applied to the <xref:System.Windows.Interop.HwndSource.RootVisual%2A> of an <xref:System.Windows.Interop.HwndSource> because this can disable <xref:System.Windows.Interop.HwndSource.SizeToContent%2A> behavior. The content will scale, but the enclosing window will not. Instead of applying the transformation to the object that is the <xref:System.Windows.Interop.HwndSource.RootVisual%2A>, apply the transformation to an object that is a child element of the <xref:System.Windows.Interop.HwndSource.RootVisual%2A>. You might need to add an extra enclosing element to the [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] content, such as a panel, in order to provide a scaleable object.
You can add a <xref:System.Windows.Window> as the root visual, but only as a top-level window (with WS_OVERLAPPED), not as a child window.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to set this property. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
<altmember cref="P:System.Windows.Interop.HwndTarget.RootVisual" />
</Docs>
</Member>
<Member MemberName="SizeToContent">
<MemberSignature Language="C#" Value="public System.Windows.SizeToContent SizeToContent { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Windows.SizeToContent SizeToContent" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.SizeToContent" />
<MemberSignature Language="VB.NET" Value="Public Property SizeToContent As SizeToContent" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::SizeToContent SizeToContent { System::Windows::SizeToContent get(); void set(System::Windows::SizeToContent value); };" />
<MemberSignature Language="F#" Value="member this.SizeToContent : System.Windows.SizeToContent with get, set" Usage="System.Windows.Interop.HwndSource.SizeToContent" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.SizeToContent</ReturnType>
</ReturnValue>
<Docs>
<summary>Get or sets whether and how the window is sized to its content.</summary>
<value>One of the enumeration values. The default value is <see cref="F:System.Windows.SizeToContent.Manual" />, which specifies that the window is not sized to its content.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
End users might indirectly set this property through application UI, if that functionality is exposed by the application.
Scale transformations should not be applied to the <xref:System.Windows.Interop.HwndSource.RootVisual%2A> of an <xref:System.Windows.Interop.HwndSource>, because this can disable <xref:System.Windows.Interop.HwndSource.SizeToContent%2A> behavior. See Remarks for <xref:System.Windows.Interop.HwndSource.RootVisual%2A>.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Window.SizeToContent" />
</Docs>
</Member>
<Member MemberName="SizeToContentChanged">
<MemberSignature Language="C#" Value="public event EventHandler SizeToContentChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler SizeToContentChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Interop.HwndSource.SizeToContentChanged" />
<MemberSignature Language="VB.NET" Value="Public Event SizeToContentChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ SizeToContentChanged;" />
<MemberSignature Language="F#" Value="member this.SizeToContentChanged : EventHandler " Usage="member this.SizeToContentChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the value of the <see cref="P:System.Windows.Interop.HwndSource.SizeToContent" /> property changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Interop.HwndSource.SizeToContentChanged> event is only raised when user interaction causes the change. If you set <xref:System.Windows.Window.SizeToContent%2A> in code, the <xref:System.Windows.Interop.HwndSource.SizeToContentChanged> event is not raised.
]]></format>
</remarks>
<altmember cref="E:System.Windows.Interop.HwndSource.AutoResized" />
<altmember cref="P:System.Windows.Interop.HwndSource.SizeToContent" />
</Docs>
</Member>
<Member MemberName="System.Windows.Interop.IKeyboardInputSink.HasFocusWithin">
<MemberSignature Language="C#" Value="bool IKeyboardInputSink.HasFocusWithin ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Windows.Interop.IKeyboardInputSink.HasFocusWithin() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.System#Windows#Interop#IKeyboardInputSink#HasFocusWithin" />
<MemberSignature Language="VB.NET" Value="Function HasFocusWithin () As Boolean Implements IKeyboardInputSink.HasFocusWithin" />
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Windows.Interop.IKeyboardInputSink.HasFocusWithin() = System::Windows::Interop::IKeyboardInputSink::HasFocusWithin;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Interop.IKeyboardInputSink.HasFocusWithin</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>For a description of this member, see <see cref="M:System.Windows.Media.FamilyTypefaceCollection.System#Collections#IList#Remove(System.Object)" />.</summary>
<returns>
<see langword="true" /> if the sink or one of its contained components has focus; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Interop.HwndSource> instance is cast to an <xref:System.Windows.Interop.IKeyboardInputSink> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Windows.Interop.IKeyboardInputSink.KeyboardInputSite">
<MemberSignature Language="C#" Value="System.Windows.Interop.IKeyboardInputSite System.Windows.Interop.IKeyboardInputSink.KeyboardInputSite { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Interop.IKeyboardInputSite System.Windows.Interop.IKeyboardInputSink.KeyboardInputSite" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.System#Windows#Interop#IKeyboardInputSink#KeyboardInputSite" />
<MemberSignature Language="VB.NET" Value=" Property KeyboardInputSite As IKeyboardInputSite Implements IKeyboardInputSink.KeyboardInputSite" />
<MemberSignature Language="C++ CLI" Value="property System::Windows::Interop::IKeyboardInputSite ^ System::Windows::Interop::IKeyboardInputSink::KeyboardInputSite { System::Windows::Interop::IKeyboardInputSite ^ get(); void set(System::Windows::Interop::IKeyboardInputSite ^ value); };" />
<MemberSignature Language="F#" Usage="System.Windows.Interop.IKeyboardInputSink.KeyboardInputSite" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Windows.Interop.IKeyboardInputSink.KeyboardInputSite</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>set: System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5">
<AttributeName>get: System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Interop.IKeyboardInputSite</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Windows.Interop.IKeyboardInputSink.KeyboardInputSite" />.</summary>
<value>A reference to the container's <see cref="T:System.Windows.Interop.IKeyboardInputSite" /> interface.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Interop.HwndSource> instance is cast to an <xref:System.Windows.Interop.IKeyboardInputSink> interface.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.SecurityPermission">to set this property. Associated enumeration: <see cref="F:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode" /></permission>
<related type="Article" href="https://msdn.microsoft.com/library/0ffbde0d-701d-45a3-a6fa-dd71f4d9772e">WPF and Win32 Interoperation Overview</related>
<related type="Article" href="https://msdn.microsoft.com/library/ee5258b7-6567-415a-9b1c-c0cbe46e79ef">Input Overview</related>
</Docs>
</Member>
<Member MemberName="System.Windows.Interop.IKeyboardInputSink.OnMnemonic">
<MemberSignature Language="C#" Value="bool IKeyboardInputSink.OnMnemonic (ref System.Windows.Interop.MSG msg, System.Windows.Input.ModifierKeys modifiers);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Windows.Interop.IKeyboardInputSink.OnMnemonic(valuetype System.Windows.Interop.MSG&amp; msg, valuetype System.Windows.Input.ModifierKeys modifiers) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.System#Windows#Interop#IKeyboardInputSink#OnMnemonic(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />
<MemberSignature Language="VB.NET" Value="Function OnMnemonic (ByRef msg As MSG, modifiers As ModifierKeys) As Boolean Implements IKeyboardInputSink.OnMnemonic" />
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Windows.Interop.IKeyboardInputSink.OnMnemonic(System::Windows::Interop::MSG % msg, System::Windows::Input::ModifierKeys modifiers) = System::Windows::Interop::IKeyboardInputSink::OnMnemonic;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Interop.IKeyboardInputSink.OnMnemonic(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5">
<AttributeName>System.Security.SecurityTreatAsSafe</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msg" Type="System.Windows.Interop.MSG" RefType="ref" />
<Parameter Name="modifiers" Type="System.Windows.Input.ModifierKeys" />
</Parameters>
<Docs>
<param name="msg">The message for the mnemonic and associated data. Do not modify this message structure. It is passed by reference for performance reasons only.</param>
<param name="modifiers">Modifier keys.</param>
<summary>For a description of this member, see <see cref="M:System.Windows.Interop.IKeyboardInputSink.OnMnemonic(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />.</summary>
<returns>
<see langword="true" /> if the message was handled; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Interop.HwndSource> instance is cast to an <xref:System.Windows.Interop.IKeyboardInputSink> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Windows.Interop.IKeyboardInputSink.RegisterKeyboardInputSink">
<MemberSignature Language="C#" Value="System.Windows.Interop.IKeyboardInputSite IKeyboardInputSink.RegisterKeyboardInputSink (System.Windows.Interop.IKeyboardInputSink sink);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Windows.Interop.IKeyboardInputSite System.Windows.Interop.IKeyboardInputSink.RegisterKeyboardInputSink(class System.Windows.Interop.IKeyboardInputSink sink) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.System#Windows#Interop#IKeyboardInputSink#RegisterKeyboardInputSink(System.Windows.Interop.IKeyboardInputSink)" />
<MemberSignature Language="VB.NET" Value="Function RegisterKeyboardInputSink (sink As IKeyboardInputSink) As IKeyboardInputSite Implements IKeyboardInputSink.RegisterKeyboardInputSink" />
<MemberSignature Language="C++ CLI" Value=" virtual System::Windows::Interop::IKeyboardInputSite ^ System.Windows.Interop.IKeyboardInputSink.RegisterKeyboardInputSink(System::Windows::Interop::IKeyboardInputSink ^ sink) = System::Windows::Interop::IKeyboardInputSink::RegisterKeyboardInputSink;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Interop.IKeyboardInputSink.RegisterKeyboardInputSink(System.Windows.Interop.IKeyboardInputSink)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Interop.IKeyboardInputSite</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sink" Type="System.Windows.Interop.IKeyboardInputSink" />
</Parameters>
<Docs>
<param name="sink">The <see cref="T:System.Windows.Interop.IKeyboardInputSink" /> sink of the contained component.</param>
<summary>For a description of this member, see <see cref="M:System.Windows.Interop.IKeyboardInputSink.RegisterKeyboardInputSink(System.Windows.Interop.IKeyboardInputSink)" />.</summary>
<returns>The <see cref="T:System.Windows.Interop.IKeyboardInputSite" /> site of the contained component.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Interop.HwndSource> instance is cast to an <xref:System.Windows.Interop.IKeyboardInputSink> interface.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to call this method. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
</Docs>
</Member>
<Member MemberName="System.Windows.Interop.IKeyboardInputSink.TabInto">
<MemberSignature Language="C#" Value="bool IKeyboardInputSink.TabInto (System.Windows.Input.TraversalRequest request);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Windows.Interop.IKeyboardInputSink.TabInto(class System.Windows.Input.TraversalRequest request) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.System#Windows#Interop#IKeyboardInputSink#TabInto(System.Windows.Input.TraversalRequest)" />
<MemberSignature Language="VB.NET" Value="Function TabInto (request As TraversalRequest) As Boolean Implements IKeyboardInputSink.TabInto" />
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Windows.Interop.IKeyboardInputSink.TabInto(System::Windows::Input::TraversalRequest ^ request) = System::Windows::Interop::IKeyboardInputSink::TabInto;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Interop.IKeyboardInputSink.TabInto(System.Windows.Input.TraversalRequest)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="request" Type="System.Windows.Input.TraversalRequest" />
</Parameters>
<Docs>
<param name="request">Specifies whether focus should be set to the first or the last tab stop.</param>
<summary>For a description of this member, see <see cref="M:System.Windows.Interop.IKeyboardInputSink.TabInto(System.Windows.Input.TraversalRequest)" />.</summary>
<returns>
<see langword="true" /> if the focus has been set as requested; <see langword="false" />, if there are no tab stops.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Interop.HwndSource> instance is cast to an <xref:System.Windows.Interop.IKeyboardInputSink> interface.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to call this method. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
</Docs>
</Member>
<Member MemberName="System.Windows.Interop.IKeyboardInputSink.TranslateAccelerator">
<MemberSignature Language="C#" Value="bool IKeyboardInputSink.TranslateAccelerator (ref System.Windows.Interop.MSG msg, System.Windows.Input.ModifierKeys modifiers);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Windows.Interop.IKeyboardInputSink.TranslateAccelerator(valuetype System.Windows.Interop.MSG&amp; msg, valuetype System.Windows.Input.ModifierKeys modifiers) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.System#Windows#Interop#IKeyboardInputSink#TranslateAccelerator(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />
<MemberSignature Language="VB.NET" Value="Function TranslateAccelerator (ByRef msg As MSG, modifiers As ModifierKeys) As Boolean Implements IKeyboardInputSink.TranslateAccelerator" />
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Windows.Interop.IKeyboardInputSink.TranslateAccelerator(System::Windows::Interop::MSG % msg, System::Windows::Input::ModifierKeys modifiers) = System::Windows::Interop::IKeyboardInputSink::TranslateAccelerator;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Interop.IKeyboardInputSink.TranslateAccelerator(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5">
<AttributeName>System.Security.SecurityTreatAsSafe</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msg" Type="System.Windows.Interop.MSG" RefType="ref" />
<Parameter Name="modifiers" Type="System.Windows.Input.ModifierKeys" />
</Parameters>
<Docs>
<param name="msg">The message and associated data. Do not modify this structure. It is passed by reference for performance reasons only.</param>
<param name="modifiers">Modifier keys.</param>
<summary>For a description of this member, see <see cref="M:System.Windows.Interop.IKeyboardInputSink.TranslateAccelerator(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />.</summary>
<returns>
<see langword="true" /> if the message was handled by the method implementation; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Interop.HwndSource> instance is cast to an <xref:System.Windows.Interop.IKeyboardInputSink> interface.
]]></format>
</remarks>
<permission cref="T:System.Security.Permissions.SecurityPermission">to call this method. Associated enumeration: <see cref="F:System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode" /></permission>
</Docs>
</Member>
<Member MemberName="System.Windows.Interop.IKeyboardInputSink.TranslateChar">
<MemberSignature Language="C#" Value="bool IKeyboardInputSink.TranslateChar (ref System.Windows.Interop.MSG msg, System.Windows.Input.ModifierKeys modifiers);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Windows.Interop.IKeyboardInputSink.TranslateChar(valuetype System.Windows.Interop.MSG&amp; msg, valuetype System.Windows.Input.ModifierKeys modifiers) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.System#Windows#Interop#IKeyboardInputSink#TranslateChar(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />
<MemberSignature Language="VB.NET" Value="Function TranslateChar (ByRef msg As MSG, modifiers As ModifierKeys) As Boolean Implements IKeyboardInputSink.TranslateChar" />
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Windows.Interop.IKeyboardInputSink.TranslateChar(System::Windows::Interop::MSG % msg, System::Windows::Input::ModifierKeys modifiers) = System::Windows::Interop::IKeyboardInputSink::TranslateChar;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Interop.IKeyboardInputSink.TranslateChar(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5">
<AttributeName>System.Security.SecurityTreatAsSafe</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msg" Type="System.Windows.Interop.MSG" RefType="ref" />
<Parameter Name="modifiers" Type="System.Windows.Input.ModifierKeys" />
</Parameters>
<Docs>
<param name="msg">The message and associated data. Do not modify this structure. It is passed by reference for performance reasons only.</param>
<param name="modifiers">Modifier keys.</param>
<summary>For a description of this member, see <see cref="M:System.Windows.Interop.IKeyboardInputSink.TranslateChar(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />.</summary>
<returns>
<see langword="true" /> if the message was processed and <see cref="M:System.Windows.Interop.IKeyboardInputSink.OnMnemonic(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" /> should not be called; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.Interop.HwndSource> instance is cast to an <xref:System.Windows.Interop.IKeyboardInputSink> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="TabIntoCore">
<MemberSignature Language="C#" Value="protected virtual bool TabIntoCore (System.Windows.Input.TraversalRequest request);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance bool TabIntoCore(class System.Windows.Input.TraversalRequest request) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.TabIntoCore(System.Windows.Input.TraversalRequest)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function TabIntoCore (request As TraversalRequest) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual bool TabIntoCore(System::Windows::Input::TraversalRequest ^ request);" />
<MemberSignature Language="F#" Value="abstract member TabIntoCore : System.Windows.Input.TraversalRequest -&gt; bool&#xA;override this.TabIntoCore : System.Windows.Input.TraversalRequest -&gt; bool" Usage="hwndSource.TabIntoCore request" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="request" Type="System.Windows.Input.TraversalRequest" Index="0" FrameworkAlternate="netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="request">Specifies whether focus should be set to the first or the last tab stop.</param>
<summary>Sets focus on either the first tab stop or the last tab stop of the sink.</summary>
<returns>
<see langword="true" /> if the focus has been set as requested; <see langword="false" />, if there are no tab stops.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="request" /> is <see langword="null" />.</exception>
<altmember cref="M:System.Windows.Interop.IKeyboardInputSink.TabInto(System.Windows.Input.TraversalRequest)" />
</Docs>
</Member>
<Member MemberName="TranslateAcceleratorCore">
<MemberSignature Language="C#" Value="protected virtual bool TranslateAcceleratorCore (ref System.Windows.Interop.MSG msg, System.Windows.Input.ModifierKeys modifiers);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance bool TranslateAcceleratorCore(valuetype System.Windows.Interop.MSG&amp; msg, valuetype System.Windows.Input.ModifierKeys modifiers) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.TranslateAcceleratorCore(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function TranslateAcceleratorCore (ByRef msg As MSG, modifiers As ModifierKeys) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual bool TranslateAcceleratorCore(System::Windows::Interop::MSG % msg, System::Windows::Input::ModifierKeys modifiers);" />
<MemberSignature Language="F#" Value="abstract member TranslateAcceleratorCore : * System.Windows.Input.ModifierKeys -&gt; bool&#xA;override this.TranslateAcceleratorCore : * System.Windows.Input.ModifierKeys -&gt; bool" Usage="hwndSource.TranslateAcceleratorCore (msg, modifiers)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msg" Type="System.Windows.Interop.MSG" RefType="ref" Index="0" FrameworkAlternate="netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="modifiers" Type="System.Windows.Input.ModifierKeys" Index="1" FrameworkAlternate="netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="msg">The message and associated data. Do not modify this structure. It is passed by reference for performance reasons only.</param>
<param name="modifiers">Modifier keys.</param>
<summary>Processes keyboard input at the key-down message level.</summary>
<returns>
<see langword="true" /> if the message was handled by the method implementation; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to call this method. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
<altmember cref="M:System.Windows.Interop.IKeyboardInputSink.TranslateAccelerator(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />
</Docs>
</Member>
<Member MemberName="TranslateCharCore">
<MemberSignature Language="C#" Value="protected virtual bool TranslateCharCore (ref System.Windows.Interop.MSG msg, System.Windows.Input.ModifierKeys modifiers);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance bool TranslateCharCore(valuetype System.Windows.Interop.MSG&amp; msg, valuetype System.Windows.Input.ModifierKeys modifiers) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Interop.HwndSource.TranslateCharCore(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function TranslateCharCore (ByRef msg As MSG, modifiers As ModifierKeys) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual bool TranslateCharCore(System::Windows::Interop::MSG % msg, System::Windows::Input::ModifierKeys modifiers);" />
<MemberSignature Language="F#" Value="abstract member TranslateCharCore : * System.Windows.Input.ModifierKeys -&gt; bool&#xA;override this.TranslateCharCore : * System.Windows.Input.ModifierKeys -&gt; bool" Usage="hwndSource.TranslateCharCore (msg, modifiers)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="msg" Type="System.Windows.Interop.MSG" RefType="ref" Index="0" FrameworkAlternate="netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="modifiers" Type="System.Windows.Input.ModifierKeys" Index="1" FrameworkAlternate="netcore-3.0;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="msg">The message and associated data. Do not modify this structure. It is passed by reference for performance reasons only.</param>
<param name="modifiers">Modifier keys.</param>
<summary>Processes WM_CHAR, WM_SYSCHAR, WM_DEADCHAR, and WM_SYSDEADCHAR input messages before the <see cref="M:System.Windows.Interop.IKeyboardInputSink.OnMnemonic(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" /> method is called.</summary>
<returns>
<see langword="true" /> if the message was processed and <see cref="M:System.Windows.Interop.IKeyboardInputSink.OnMnemonic(System.Windows.Interop.MSG@,System.Windows.Input.ModifierKeys)" /> should not be called; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<permission cref="T:System.Security.Permissions.UIPermission">to call this method. Associated enumeration: <see cref="F:System.Security.Permissions.UIPermissionWindow.AllWindows" /></permission>
</Docs>
</Member>
<Member MemberName="UsesPerPixelOpacity">
<MemberSignature Language="C#" Value="public bool UsesPerPixelOpacity { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool UsesPerPixelOpacity" />
<MemberSignature Language="DocId" Value="P:System.Windows.Interop.HwndSource.UsesPerPixelOpacity" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property UsesPerPixelOpacity As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool UsesPerPixelOpacity { bool get(); };" />
<MemberSignature Language="F#" Value="member this.UsesPerPixelOpacity : bool" Usage="System.Windows.Interop.HwndSource.UsesPerPixelOpacity" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>get: System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that declares whether the per-pixel opacity of the source window content is respected.</summary>
<value>
<see langword="true" /> if the system uses per-pixel opacity; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you enable per-pixel opacity, the system no longer draws the non-client area. This is because the intended purpose of <xref:System.Windows.Interop.HwndSource.UsesPerPixelOpacity%2A> is to show non-rectangular top-level UI that works in interoperation scenarios. Therefore, showing the rectangular non-client area defeats that purpose.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.