-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
RequestBringIntoViewEventHandler.xml
51 lines (47 loc) · 4.55 KB
/
RequestBringIntoViewEventHandler.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<Type Name="RequestBringIntoViewEventHandler" FullName="System.Windows.RequestBringIntoViewEventHandler">
<TypeSignature Language="C#" Value="public delegate void RequestBringIntoViewEventHandler(object sender, RequestBringIntoViewEventArgs e);" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed RequestBringIntoViewEventHandler extends System.MulticastDelegate" />
<TypeSignature Language="DocId" Value="T:System.Windows.RequestBringIntoViewEventHandler" />
<TypeSignature Language="VB.NET" Value="Public Delegate Sub RequestBringIntoViewEventHandler(sender As Object, e As RequestBringIntoViewEventArgs)" />
<TypeSignature Language="F#" Value="type RequestBringIntoViewEventHandler = delegate of obj * RequestBringIntoViewEventArgs -> unit" />
<TypeSignature Language="C++ CLI" Value="public delegate void RequestBringIntoViewEventHandler(System::Object ^ sender, RequestBringIntoViewEventArgs ^ e);" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Parameters>
<Parameter Name="sender" Type="System.Object" />
<Parameter Name="e" Type="System.Windows.RequestBringIntoViewEventArgs" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Docs>
<param name="sender">The object where the event handler is attached.</param>
<param name="e">The event data.</param>
<summary>Represents the method that will handle the <see cref="E:System.Windows.FrameworkElement.RequestBringIntoView" /> routed event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handling this event is typically only done within elements that support a scrollable region, or otherwise deliberately set their rendering size smaller than the combined desired size of their child element content, and is only done by deliberately handling the event once it has routed upwards in the element tree and has reached the first parent that offers scrolling region support. An existing implementation that handles scrolling regions in a manner that is typically desirable for user controls is <xref:System.Windows.Controls.ScrollViewer>. If you derive from <xref:System.Windows.Controls.ScrollViewer>, you can register a class handler for <xref:System.Windows.FrameworkElement.RequestBringIntoView?displayProperty=nameWithType> and supplement the base class handling of the event. You should also consider using or class-handling the class-defined <xref:System.Windows.Controls.ScrollViewer.ScrollChanged> event instead of <xref:System.Windows.FrameworkElement.RequestBringIntoView?displayProperty=nameWithType>. Alternatively, if you create an entirely custom class that does not derive from <xref:System.Windows.Controls.ScrollViewer>, you can still add class handling by calling <xref:System.Windows.EventManager.RegisterClassHandler%2A?displayProperty=nameWithType> in your class instantiation. For details on class handling, see [Marking Routed Events as Handled, and Class Handling](/dotnet/framework/wpf/advanced/marking-routed-events-as-handled-and-class-handling).
Content elements can cause the event to be raised by their content hosts (through calling <xref:System.Windows.FrameworkContentElement.BringIntoView%2A> and raising <xref:System.Windows.FrameworkElement.RequestBringIntoView?displayProperty=nameWithType> from the content host). Similarly, you can request logical tree elements to be brought into view with the helper method <xref:System.Windows.LogicalTreeHelper.BringIntoView%2A?displayProperty=nameWithType>.
A <xref:System.Windows.Controls.ListBox> implements a related but different method <xref:System.Windows.Controls.ListBox.ScrollIntoView%2A>.
]]></format>
</remarks>
<altmember cref="T:System.Windows.RequestBringIntoViewEventArgs" />
<altmember cref="P:System.Windows.UIElement.ClipToBounds" />
<altmember cref="T:System.Windows.Controls.Primitives.ScrollBar" />
<altmember cref="T:System.Windows.Controls.ScrollViewer" />
<altmember cref="M:System.Windows.FrameworkElement.BringIntoView(System.Windows.Rect)" />
<altmember cref="M:System.Windows.LogicalTreeHelper.BringIntoView(System.Windows.DependencyObject)" />
</Docs>
</Type>