ContentElement 类

定义

为内容元素提供 WPF 核心级基类。Provides a WPF core-level base class for content elements. 内容元素设计用于流样式显示,它们使用面向标记的直观布局模型和精心设计的简单对象模型。Content elements are designed for flow-style presentation, using an intuitive markup-oriented layout model and a deliberately simple object model.

public ref class ContentElement : System::Windows::DependencyObject, System::Windows::IInputElement, System::Windows::Media::Animation::IAnimatable
public class ContentElement : System.Windows.DependencyObject, System.Windows.IInputElement, System.Windows.Media.Animation.IAnimatable
type ContentElement = class
    inherit DependencyObject
    interface IInputElement
    interface IAnimatable
Public Class ContentElement
Inherits DependencyObject
Implements IAnimatable, IInputElement
继承
派生
实现

注解

ContentElement 定义以下常见内容特征:ContentElement defines the following common content characteristics:

  • 输入:所有 ContentElement 派生类都为键盘、鼠标、拖放操作、触笔控件和快捷键提供基本的输入捕获支持。Input: All ContentElement derived classes provide support for basic input capture from keyboard, mouse, drag-and-drop operations, stylus controls, and accelerators.

  • 集中性:所有 ContentElement 派生类都有可能获得焦点。Focus: All ContentElement derived classes are potentially focusable. (但是,ContentElement 基类的默认可设定焦点状态为 false(However, the default focusable state for the ContentElement base class is false. 有关如何使 ContentElement 具有可设定焦点的详细信息,请参阅 Focusable。)此外,此类包含可用于跨相关元素遍历焦点的 Api。For details on how to make a ContentElement focusable, see Focusable.) In addition, this class contains APIs that you can use for traversing the focus across related elements.

  • 事件: ContentElement 包括与输入和焦点相关的事件;它还包括状态更改的事件。Events: ContentElement includes events that are related to input and focus; it also includes events for changes in state. 在许多情况下,ContentElement 事件是路由事件。In many cases, the ContentElement events are routed events. 在某些情况下,路由事件同时具有隧道和冒泡路由策略,作为响应相同状态或条件的单独事件而引发。In some cases, routed events have both tunneling and bubbling routing strategies, raised as separate events in response to the same state or condition. 此外,ContentElement 定义可引发路由事件并且可以添加或删除事件处理程序的 Api。Also, ContentElement defines APIs that can raise routed events and that can add or remove handlers to events.

ContentElementUIElement共享多个常见 Api。ContentElement shares many common APIs with UIElement. 这些公共 Api 不来自共享类继承。These common APIs do not come from a shared class inheritance. 但在每个类中,它们共享公共命名、类似行为和相似的 Api 内部实现。But they do share common naming, similar behavior, and similar internal implementation of APIs in each class. 相似性是因为 ContentElementUIElement 是作为元素基础的每个类,但对于其标记对象模型行为,每个类都有不同的意图。The similarity is because ContentElement and UIElement are each classes that are an element base, although each has different intentions for its markup object model behavior.

具体而言,从 VisualUIElement 下降,这为在复合窗口内呈现 ContentElement 到矩形区域提供更低级别的图形支持,而 ContentElement 延迟呈现,使概念更常见于文档流和包装等方案更易于支持。In particular, UIElement descends from Visual, which provides the lower-level graphics support for rendering a ContentElement to a rectangular region within a composited window, whereas ContentElement defers rendering so that concepts more common to document scenarios, such as flow and wrapping, are more easily supported. 这两个相关类还实现了公共接口 IInputElementIAnimatableThese two related classes also implement the common interfaces IInputElement and IAnimatable.

对继承者的说明Notes to inheritors

ContentElement 类尚未定义流样式演示的完整内容元素的所有方面。The ContentElement class does not yet define all aspects of a complete content element for flow-style presentation. FrameworkContentElementContentElement的直接派生类。FrameworkContentElement is an immediately derived class of ContentElement. FrameworkContentElement 包括一组更完整的附加成员,它们支持在内容主机内呈现 FrameworkContentElement 并使用 WPF 框架级别布局系统。FrameworkContentElement includes a more complete set of additional members that support rendering a FrameworkContentElement within a content host and using the WPF framework-level layout system.

构造函数

ContentElement()

初始化 ContentElement 类的新实例。Initializes a new instance of the ContentElement class.

字段

AllowDropProperty

标识 AllowDrop 依赖项属性。Identifies the AllowDrop dependency property.

AreAnyTouchesCapturedProperty

标识 AreAnyTouchesCaptured 依赖项属性。Identifies the AreAnyTouchesCaptured dependency property.

AreAnyTouchesCapturedWithinProperty

标识 AreAnyTouchesCapturedWithin 依赖项属性。Identifies the AreAnyTouchesCapturedWithin dependency property.

AreAnyTouchesDirectlyOverProperty

标识 AreAnyTouchesDirectlyOver 依赖项属性。Identifies the AreAnyTouchesDirectlyOver dependency property.

AreAnyTouchesOverProperty

标识 AreAnyTouchesOver 依赖项属性。Identifies the AreAnyTouchesOver dependency property.

DragEnterEvent

标识 DragEnter 路由事件。Identifies the DragEnter routed event.

DragLeaveEvent

标识 DragLeave 路由事件。Identifies the DragLeave routed event.

DragOverEvent

标识 DragOver 路由事件。Identifies the DragOver routed event.

DropEvent

标识 Drop 路由事件。Identifies the Drop routed event.

FocusableProperty

标识 Focusable 依赖项属性。Identifies the Focusable dependency property.

GiveFeedbackEvent

标识 GiveFeedback 路由事件。Identifies the GiveFeedback routed event.

GotFocusEvent

标识 GotFocus 路由事件。Identifies the GotFocus routed event.

GotKeyboardFocusEvent

标识 GotKeyboardFocus 路由事件。Identifies the GotKeyboardFocus routed event.

GotMouseCaptureEvent

标识 GotMouseCapture 路由事件。Identifies the GotMouseCapture routed event.

GotStylusCaptureEvent

标识 GotStylusCapture 路由事件。Identifies the GotStylusCapture routed event.

GotTouchCaptureEvent

标识 GotTouchCapture 路由事件。Identifies the GotTouchCapture routed event.

IsEnabledProperty

标识 IsEnabled 依赖项属性。Identifies the IsEnabled dependency property.

IsFocusedProperty

标识 IsFocused 依赖项属性。Identifies the IsFocused dependency property.

IsKeyboardFocusedProperty

标识 IsKeyboardFocused 依赖项属性。Identifies the IsKeyboardFocused dependency property.

IsKeyboardFocusWithinProperty

标识 IsKeyboardFocusWithin 依赖项属性。Identifies the IsKeyboardFocusWithin dependency property.

IsMouseCapturedProperty

标识 IsMouseCaptured 依赖项属性。Identifies the IsMouseCaptured dependency property.

IsMouseCaptureWithinProperty

标识 IsMouseCaptureWithin 依赖项属性。Identifies the IsMouseCaptureWithin dependency property.

IsMouseDirectlyOverProperty

标识 IsMouseDirectlyOver 依赖项属性。Identifies the IsMouseDirectlyOver dependency property.

IsMouseOverProperty

标识 IsMouseOver 依赖项属性。Identifies the IsMouseOver dependency property.

IsStylusCapturedProperty

标识 IsStylusCaptured 依赖项属性。Identifies the IsStylusCaptured dependency property.

IsStylusCaptureWithinProperty

标识 IsStylusCaptureWithin 依赖项属性。Identifies the IsStylusCaptureWithin dependency property.

IsStylusDirectlyOverProperty

标识 IsStylusDirectlyOver 依赖项属性。Identifies the IsStylusDirectlyOver dependency property.

IsStylusOverProperty

标识 IsStylusOver 依赖项属性。Identifies the IsStylusOver dependency property.

KeyDownEvent

标识 KeyDown 路由事件。Identifies the KeyDown routed event.

KeyUpEvent

标识 KeyUp 路由事件。Identifies the KeyUp routed event.

LostFocusEvent

标识 LostFocus 路由事件。Identifies the LostFocus routed event.

LostKeyboardFocusEvent

标识 LostKeyboardFocus 路由事件。Identifies the LostKeyboardFocus routed event.

LostMouseCaptureEvent

标识 LostMouseCapture 路由事件。Identifies the LostMouseCapture routed event.

LostStylusCaptureEvent

标识 LostStylusCapture 路由事件。Identifies the LostStylusCapture routed event.

LostTouchCaptureEvent

标识 LostTouchCapture 路由事件。Identifies the LostTouchCapture routed event.

MouseDownEvent

标识 MouseDown 路由事件。Identifies the MouseDown routed event.

MouseEnterEvent

标识 MouseEnter 路由事件。Identifies the MouseEnter routed event.

MouseLeaveEvent

标识 MouseLeave 路由事件。Identifies the MouseLeave routed event.

MouseLeftButtonDownEvent

标识 MouseLeftButtonDown 路由事件。Identifies the MouseLeftButtonDown routed event.

MouseLeftButtonUpEvent

标识 MouseLeftButtonUp 路由事件。Identifies the MouseLeftButtonUp routed event.

MouseMoveEvent

标识 MouseMove 路由事件。Identifies the MouseMove routed event.

MouseRightButtonDownEvent

标识 MouseRightButtonDown 路由事件。Identifies the MouseRightButtonDown routed event.

MouseRightButtonUpEvent

标识 MouseRightButtonUp 路由事件。Identifies the MouseRightButtonUp routed event.

MouseUpEvent

标识 MouseUp 路由事件。Identifies the MouseUp routed event.

MouseWheelEvent

标识 MouseWheel 路由事件。Identifies the MouseWheel routed event.

PreviewDragEnterEvent

标识 PreviewDragEnter 路由事件。Identifies the PreviewDragEnter routed event.

PreviewDragLeaveEvent

标识 PreviewDragLeave 路由事件。Identifies the PreviewDragLeave routed event.

PreviewDragOverEvent

标识 PreviewDragOver 路由事件。Identifies the PreviewDragOver routed event.

PreviewDropEvent

标识 PreviewDrop 路由事件。Identifies the PreviewDrop routed event.

PreviewGiveFeedbackEvent

标识 PreviewGiveFeedback 路由事件。Identifies the PreviewGiveFeedback routed event.

PreviewGotKeyboardFocusEvent

标识 PreviewGotKeyboardFocus 路由事件。Identifies the PreviewGotKeyboardFocus routed event.

PreviewKeyDownEvent

标识 PreviewKeyDown 路由事件。Identifies the PreviewKeyDown routed event.

PreviewKeyUpEvent

标识 PreviewKeyUp 路由事件。Identifies the PreviewKeyUp routed event.

PreviewLostKeyboardFocusEvent

标识 PreviewLostKeyboardFocus 路由事件。Identifies the PreviewLostKeyboardFocus routed event.

PreviewMouseDownEvent

标识 PreviewMouseDown 路由事件。Identifies the PreviewMouseDown routed event.

PreviewMouseLeftButtonDownEvent

标识 PreviewMouseLeftButtonDown 路由事件。Identifies the PreviewMouseLeftButtonDown routed event.

PreviewMouseLeftButtonUpEvent

标识 PreviewMouseLeftButtonUp 路由事件。Identifies the PreviewMouseLeftButtonUp routed event.

PreviewMouseMoveEvent

标识 PreviewMouseMove 路由事件。Identifies the PreviewMouseMove routed event.

PreviewMouseRightButtonDownEvent

标识 PreviewMouseRightButtonDown 路由事件。Identifies the PreviewMouseRightButtonDown routed event.

PreviewMouseRightButtonUpEvent

标识 PreviewMouseRightButtonUp 路由事件。Identifies the PreviewMouseRightButtonUp routed event.

PreviewMouseUpEvent

标识 PreviewMouseUp 路由事件。Identifies the PreviewMouseUp routed event.

PreviewMouseWheelEvent

标识 PreviewMouseWheel 路由事件。Identifies the PreviewMouseWheel routed event.

PreviewQueryContinueDragEvent

标识 PreviewQueryContinueDrag 路由事件。Identifies the PreviewQueryContinueDrag routed event.

PreviewStylusButtonDownEvent

标识 PreviewStylusButtonDown 路由事件。Identifies the PreviewStylusButtonDown routed event.

PreviewStylusButtonUpEvent

标识 PreviewStylusButtonUp 路由事件。Identifies the PreviewStylusButtonUp routed event.

PreviewStylusDownEvent

标识 PreviewStylusDown 路由事件。Identifies the PreviewStylusDown routed event.

PreviewStylusInAirMoveEvent

标识 PreviewStylusInAirMove 路由事件。Identifies the PreviewStylusInAirMove routed event.

PreviewStylusInRangeEvent

标识 PreviewStylusInRange 路由事件。Identifies the PreviewStylusInRange routed event.

PreviewStylusMoveEvent

标识 PreviewStylusMove 路由事件。Identifies the PreviewStylusMove routed event.

PreviewStylusOutOfRangeEvent

标识 PreviewStylusOutOfRange 路由事件。Identifies the PreviewStylusOutOfRange routed event.

PreviewStylusSystemGestureEvent

标识 PreviewStylusSystemGesture 路由事件。Identifies the PreviewStylusSystemGesture routed event.

PreviewStylusUpEvent

标识 PreviewStylusUp 路由事件。Identifies the PreviewStylusUp routed event.

PreviewTextInputEvent

标识 PreviewTextInput 路由事件。Identifies the PreviewTextInput routed event.

PreviewTouchDownEvent

标识 PreviewTouchDown 路由事件。Identifies the PreviewTouchDown routed event.

PreviewTouchMoveEvent

标识 PreviewTouchMove 路由事件。Identifies the PreviewTouchMove routed event.

PreviewTouchUpEvent

标识 PreviewTouchUp 路由事件。Identifies the PreviewTouchUp routed event.

QueryContinueDragEvent

标识 QueryContinueDrag 路由事件。Identifies the QueryContinueDrag routed event.

QueryCursorEvent

标识 QueryCursor 路由事件。Identifies the QueryCursor routed event.

StylusButtonDownEvent

标识 StylusButtonDown 路由事件。Identifies the StylusButtonDown routed event.

StylusButtonUpEvent

标识 StylusButtonUp 路由事件。Identifies the StylusButtonUp routed event.

StylusDownEvent

标识 StylusDown 路由事件。Identifies the StylusDown routed event.

StylusEnterEvent

标识 StylusEnter 路由事件。Identifies the StylusEnter routed event.

StylusInAirMoveEvent

标识 StylusInAirMove 路由事件。Identifies the StylusInAirMove routed event.

StylusInRangeEvent

标识 StylusInRange 路由事件。Identifies the StylusInRange routed event.

StylusLeaveEvent

标识 StylusLeave 路由事件。Identifies the StylusLeave routed event.

StylusMoveEvent

标识 StylusMove 路由事件。Identifies the StylusMove routed event.

StylusOutOfRangeEvent

标识 StylusOutOfRange 路由事件。Identifies the StylusOutOfRange routed event.

StylusSystemGestureEvent

标识 StylusSystemGesture 路由事件。Identifies the StylusSystemGesture routed event.

StylusUpEvent

标识 StylusUp 路由事件。Identifies the StylusUp routed event.

TextInputEvent

标识 TextInput 路由事件。Identifies the TextInput routed event.

TouchDownEvent

标识 TouchDown 路由事件。Identifies the TouchDown routed event.

TouchEnterEvent

标识 TouchEnter 路由事件。Identifies the TouchEnter routed event.

TouchLeaveEvent

标识 TouchLeave 路由事件。Identifies the TouchLeave routed event.

TouchMoveEvent

标识 TouchMove 路由事件。Identifies the TouchMove routed event.

TouchUpEvent

标识 TouchUp 路由事件。Identifies the TouchUp routed event.

属性

AllowDrop

获取或设置一个值,该值指示此元素能否用作拖放操作的目标。Gets or sets a value that indicates whether this element can be used as the target of a drag-and-drop operation.

AreAnyTouchesCaptured

获取一个值,该值指示在此元素上是否至少捕获了一次触摸。Gets a value that indicates whether at least one touch is captured to this element.

AreAnyTouchesCapturedWithin

获取一个值,该值指示在此元素或其可视化树中的任何子元素上是否至少捕获了一次触摸。Gets a value that indicates whether at least one touch is captured to this element or to any child elements in its visual tree.

AreAnyTouchesDirectlyOver

获取一个值,该值指示在此元素上是否至少按下了一次触摸设备。Gets a value that indicates whether at least one touch is pressed over this element.

AreAnyTouchesOver

获取一个值,该值指示在此元素或其可视化树中的任何子元素上是否至少按下了一次触摸设备。Gets a value that indicates whether at least one touch is pressed over this element or any child elements in its visual tree.

CommandBindings

获取与此元素关联的 CommandBinding 对象的集合。Gets a collection of CommandBinding objects that are associated with this element.

DependencyObjectType

获取对此实例的 CLRCLR 类型进行包装的 DependencyObjectTypeGets the DependencyObjectType that wraps the CLRCLR type of this instance.

(继承自 DependencyObject)
Dispatcher

获取与此 Dispatcher 关联的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(继承自 DispatcherObject)
Focusable

获取或设置一个值,该值指示元素能否得到焦点。Gets or sets a value that indicates whether the element can receive focus.

HasAnimatedProperties

获取一个值,该值指示此元素是否具有任何进行动画处理的属性。Gets a value that indicates whether this element has any animated properties.

InputBindings

获取与此元素关联的输入绑定的集合。Gets the collection of input bindings that are associated with this element.

IsEnabled

获取或设置一个值,该值指示是否在用户界面 (UI)user interface (UI) 中启用了此元素。Gets or sets a value that indicates whether this element is enabled in the 用户界面 (UI)user interface (UI).

IsEnabledCore

获取一个值,该值成为派生类中 IsEnabled 的返回值。Gets a value that becomes the return value of IsEnabled in derived classes.

IsFocused

获取一个值,该值确定此元素是否具有逻辑焦点。Gets a value that determines whether this element has logical focus.

IsInputMethodEnabled

获取一个值,该值指示是否启用输入法系统(如 输入法编辑器 (IME)Input Method Editor (IME))来处理此元素的输入。Gets a value that indicates whether an input method system, such as an 输入法编辑器 (IME)Input Method Editor (IME), is enabled for processing the input to this element.

IsKeyboardFocused

获取一个值,该值表示此元素是否具有键盘焦点。Gets a value that indicates whether this element has keyboard focus.

IsKeyboardFocusWithin

获取一个值,该值指示键盘焦点是否位于元素或子元素内的任意位置。Gets a value that indicates whether keyboard focus is anywhere within the element or child elements.

IsMouseCaptured

获取一个值,该值指示此元素是否捕获了鼠标。Gets a value that indicates whether the mouse is captured by this element.

IsMouseCaptureWithin

获取一个值,该值确定此元素或其元素树中的子元素是否具有鼠标捕获。Gets a value that determines whether mouse capture is held by this element or by child elements in its element tree.

IsMouseDirectlyOver

获取一个值,该值指示在考虑元素组合的情况下,鼠标指针的位置是否对应于命中测试结果。Gets a value that indicates whether the position of the mouse pointer corresponds to hit test results, which take element compositing into account.

IsMouseOver

获取一个值,该值指示鼠标指针是否位于此元素(包括可视子元素或其控件组合)上。Gets a value that indicates whether the mouse pointer is located over this element (including visual child elements, or its control compositing).

IsSealed

获取一个值,该值指示此实例当前是否为密封的(只读)。Gets a value that indicates whether this instance is currently sealed (read-only).

(继承自 DependencyObject)
IsStylusCaptured

获取一个值,该值指示是否将触笔捕获到此元素。Gets a value that indicates whether the stylus is captured to this element.

IsStylusCaptureWithin

获取一个值,该值确定此元素(包括子元素和控件组合)是否具有触笔捕获。Gets a value that determines whether stylus capture is held by this element, including child elements and control compositing.

IsStylusDirectlyOver

获取一个值,该值指示触笔的位置是否与考虑元素组合的命中测试结果相对应。Gets a value that indicates whether the stylus position corresponds to hit test results, which take element compositing into account.

IsStylusOver

获取一个值,该值指示触笔是否位于此元素(包括可视子元素)上。Gets a value that indicates whether the stylus is located over this element (including visual child elements).

TouchesCaptured

获取在此元素上捕获的所有触摸设备。Gets all touch devices that are captured to this element.

TouchesCapturedWithin

获取在此元素或其可视化树中的任何子元素上捕获的所有触摸设备。Gets all touch devices that are captured to this element or any child elements in its visual tree.

TouchesDirectlyOver

获取此元素上的所有触摸设备。Gets all touch devices that are over this element.

TouchesOver

获取在此元素或其可视化树中的任何子元素上的所有触摸设备。Gets all touch devices that are over this element or any child elements in its visual tree.

方法

AddHandler(RoutedEvent, Delegate)

为指定的路由事件添加路由事件处理程序,并将该处理程序添加到当前元素的处理程序集合中。Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element.

AddHandler(RoutedEvent, Delegate, Boolean)

为指定的路由事件添加路由事件处理程序,并将该处理程序添加到当前元素的处理程序集合中。Adds a routed event handler for a specified routed event, adding the handler to the handler collection on the current element. handledEventsToo 指定为 true,可为已标记为由事件路由中的其他元素处理的路由事件调用所提供的处理程序。Specify handledEventsToo as true to have the provided handler be invoked for routed event that had already been marked as handled by another element along the event route.

AddToEventRoute(EventRoute, RoutedEventArgs)

将处理程序添加到当前 EventRoute 事件处理程序集合的指定 ContentElement 中。Adds handlers to the specified EventRoute for the current ContentElement event handler collection.

ApplyAnimationClock(DependencyProperty, AnimationClock)

将动画应用到此元素的指定依赖属性。Applies an animation to a specified dependency property on this element. 任何现有动画均停止并替换为新动画。Any existing animations are stopped and replaced with the new animation.

ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior)

向此元素的指定依赖属性应用动画,并且可以指定当该属性已有正在运行的动画时所要执行的操作。Applies an animation to a specified dependency property on this element, with the ability to specify what happens if the property already has a running animation.

BeginAnimation(DependencyProperty, AnimationTimeline)

为此元素的指定要进行动画处理的属性启动动画。Starts an animation for a specified animated property on this element.

BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)

为此元素的指定要进行动画处理的属性启动特定的动画,并可以指定当该属性已有正在运行的动画时所要执行的操作。Starts a specific animation for a specified animated property on this element, with the option of specifying what happens if the property already has a running animation.

CaptureMouse()

尝试将鼠标强制捕获到此元素。Attempts to force capture of the mouse to this element.

CaptureStylus()

尝试将触笔强制捕获到此元素。Attempts to force capture of the stylus to this element.

CaptureTouch(TouchDevice)

尝试将触摸屏输入强制捕获到此元素。Attempts to force capture of a touch to this element.

CheckAccess()

确定调用线程是否可以访问此 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)
ClearValue(DependencyProperty)

清除属性的本地值。Clears the local value of a property. 要清除的属性由 DependencyProperty 标识符指定。The property to be cleared is specified by a DependencyProperty identifier.

(继承自 DependencyObject)
ClearValue(DependencyPropertyKey)

清除只读属性的本地值。Clears the local value of a read-only property. 要清除的属性由 DependencyPropertyKey 指定。The property to be cleared is specified by a DependencyPropertyKey.

(继承自 DependencyObject)
CoerceValue(DependencyProperty)

对指定依赖属性的值进行强制。Coerces the value of the specified dependency property. 通过对调用方 DependencyObject 上存在的依赖属性的属性元数据中所指定的任何 CoerceValueCallback 函数进行调用来完成此操作。This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.

(继承自 DependencyObject)
Equals(Object)

确定提供的 DependencyObject 是否等效于当前 DependencyObjectDetermines whether a provided DependencyObject is equivalent to the current DependencyObject.

(继承自 DependencyObject)
Focus()

尝试将焦点设定到此元素上。Attempts to set focus to this element.

GetAnimationBaseValue(DependencyProperty)

为此元素上的指定属性返回基属性值,忽略任何可能来自正在运行或已停止的动画的动画值。Returns the base property value for the specified property on this element, disregarding any possible animated value from a running or stopped animation.

GetHashCode()

获取此 DependencyObject 的哈希代码。Gets a hash code for this DependencyObject.

(继承自 DependencyObject)
GetLocalValueEnumerator()

创建一个专用的枚举数,用于确定哪些依赖项属性在此 DependencyObject 上具有以本地方式设置的值。Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.

(继承自 DependencyObject)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetUIParentCore()

在派生类中重写时,如果不存在可视父级,则返回其他用户界面 (UI)user interface (UI) 父级。When overridden in a derived class, returns an alternative 用户界面 (UI)user interface (UI) parent for this element if no visual parent exists.

GetValue(DependencyProperty)

DependencyObject 的此实例返回依赖属性的当前有效值。Returns the current effective value of a dependency property on this instance of a DependencyObject.

(继承自 DependencyObject)
InvalidateProperty(DependencyProperty)

重新评估指定依赖属性的有效值。Re-evaluates the effective value for the specified dependency property.

(继承自 DependencyObject)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MoveFocus(TraversalRequest)

尝试将焦点从此元素移到其他元素。Attempts to move focus from this element to another element. 移动焦点的方向由指导方向指定,该方向在此元素的可视父级的组织结构中解释。The direction to move focus is specified by a guidance direction, which is interpreted within the organization of the visual parent for this element.

OnCreateAutomationPeer()

针对 Windows Presentation Foundation (WPF) 基础结构返回特定于类的 AutomationPeer 实现。Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

OnDragEnter(DragEventArgs)

当某个未处理的 DragEnter 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled DragEnter attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnDragLeave(DragEventArgs)

当某个未处理的 DragLeave 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled DragLeave attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnDragOver(DragEventArgs)

当某个未处理的 DragOver 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled DragOver attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnDrop(DragEventArgs)

当某个未处理的 DragEnter 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled DragEnter attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnGiveFeedback(GiveFeedbackEventArgs)

当某个未处理的 GiveFeedback 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled GiveFeedback attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnGotFocus(RoutedEventArgs)

使用所提供的事件数据引发 GotFocus 路由事件。Raises the GotFocus routed event by using the event data provided.

OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)

当某个未处理的 GotKeyboardFocus 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled GotKeyboardFocus attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnGotMouseCapture(MouseEventArgs)

当某个未处理的 GotMouseCapture 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled GotMouseCapture attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnGotStylusCapture(StylusEventArgs)

当某个未处理的 GotStylusCapture 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled GotStylusCapture attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnGotTouchCapture(TouchEventArgs)

为在此元素上捕获触摸屏输入时发生的 GotTouchCapture 路由事件提供类处理。Provides class handling for the GotTouchCapture routed event that occurs when a touch is captured to this element.

OnIsKeyboardFocusedChanged(DependencyPropertyChangedEventArgs)

当针对此元素引发未处理的 IsKeyboardFocusedChanged 事件时调用。Invoked when an unhandled IsKeyboardFocusedChanged event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

在此元素即将引发 IsKeyboardFocusWithinChanged 事件前调用。Invoked just before the IsKeyboardFocusWithinChanged event is raised by this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnIsMouseCapturedChanged(DependencyPropertyChangedEventArgs)

当针对此元素引发未处理的 IsMouseCapturedChanged 事件时调用。Invoked when an unhandled IsMouseCapturedChanged event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnIsMouseCaptureWithinChanged(DependencyPropertyChangedEventArgs)

当针对此元素引发未处理的 IsMouseCaptureWithinChanged 事件时调用。Invoked when an unhandled IsMouseCaptureWithinChanged event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnIsMouseDirectlyOverChanged(DependencyPropertyChangedEventArgs)

当针对此元素引发未处理的 IsMouseDirectlyOverChanged 事件时调用。Invoked when an unhandled IsMouseDirectlyOverChanged event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnIsStylusCapturedChanged(DependencyPropertyChangedEventArgs)

当针对此元素引发未处理的 IsStylusCapturedChanged 事件时调用。Invoked when an unhandled IsStylusCapturedChanged event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnIsStylusCaptureWithinChanged(DependencyPropertyChangedEventArgs)

当针对此元素引发未处理的 IsStylusCaptureWithinChanged 事件时调用。Invoked when an unhandled IsStylusCaptureWithinChanged event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnIsStylusDirectlyOverChanged(DependencyPropertyChangedEventArgs)

当针对此元素引发未处理的 IsStylusDirectlyOverChanged 事件时调用。Invoked when an unhandled IsStylusDirectlyOverChanged event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnKeyDown(KeyEventArgs)

当某个未处理的 KeyDown 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled KeyDown attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnKeyUp(KeyEventArgs)

当某个未处理的 KeyUp 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled KeyUp attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnLostFocus(RoutedEventArgs)

使用提供的事件数据引发 LostFocus 路由事件。Raises the LostFocus routed event by using the event data that is provided.

OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)

当某个未处理的 LostKeyboardFocus 附加事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled LostKeyboardFocus attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnLostMouseCapture(MouseEventArgs)

当某个未处理的 LostMouseCapture 附加事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled LostMouseCapture attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnLostStylusCapture(StylusEventArgs)

当某个未处理的 LostStylusCapture 附加事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled LostStylusCapture attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnLostTouchCapture(TouchEventArgs)

为在此元素失去触摸屏输入捕获时发生的 LostTouchCapture 路由事件提供类处理。Provides class handling for the LostTouchCapture routed event that occurs when this element loses a touch capture.

OnMouseDown(MouseButtonEventArgs)

当某个未处理的 MouseDown 附加事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled MouseDown attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseEnter(MouseEventArgs)

当此元素引发未处理的 MouseEnter 附加事件时调用。Invoked when an unhandled MouseEnter attached event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseLeave(MouseEventArgs)

当此元素引发未处理的 MouseLeave 附加事件时调用。Invoked when an unhandled MouseLeave attached event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseLeftButtonDown(MouseButtonEventArgs)

当此元素引发未处理的 MouseLeftButtonDown 路由事件时调用。Invoked when an unhandled MouseLeftButtonDown routed event is raised on this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseLeftButtonUp(MouseButtonEventArgs)

当某个未处理的 MouseLeftButtonUp 路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseMove(MouseEventArgs)

当某个未处理的 MouseMove 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled MouseMove attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseRightButtonDown(MouseButtonEventArgs)

当某个未处理的 MouseRightButtonDown 路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled MouseRightButtonDown routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseRightButtonUp(MouseButtonEventArgs)

当某个未处理的 MouseRightButtonUp 路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled MouseRightButtonUp routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseUp(MouseButtonEventArgs)

当某个未处理的 MouseUp 路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled MouseUp routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnMouseWheel(MouseWheelEventArgs)

当某个未处理的 MouseWheel 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled MouseWheel attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewDragEnter(DragEventArgs)

当某个未处理的 PreviewDragEnter 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewDragEnter attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewDragLeave(DragEventArgs)

当某个未处理的 PreviewDragLeave 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewDragLeave attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewDragOver(DragEventArgs)

当某个未处理的 PreviewDragOver 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewDragOver attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewDrop(DragEventArgs)

当某个未处理的 PreviewDrop 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewDrop attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewGiveFeedback(GiveFeedbackEventArgs)

当某个未处理的 PreviewGiveFeedback 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewGiveFeedback attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs)

当某个未处理的 PreviewGotKeyboardFocus 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewGotKeyboardFocus attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewKeyDown(KeyEventArgs)

当某个未处理的 PreviewKeyDown 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewKeyDown attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewKeyUp(KeyEventArgs)

当某个未处理的 PreviewKeyUp 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewKeyUp attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs)

当某个未处理的 PreviewKeyDown 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewKeyDown attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewMouseDown(MouseButtonEventArgs)

当某个未处理的 PreviewMouseDown 附加路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled PreviewMouseDown attached routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)

当某个未处理的 PreviewMouseLeftButtonDown 路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled PreviewMouseLeftButtonDown routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewMouseLeftButtonUp(MouseButtonEventArgs)

当某个未处理的 PreviewMouseLeftButtonUp 路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled PreviewMouseLeftButtonUp routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewMouseMove(MouseEventArgs)

当某个未处理的 PreviewMouseMove 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewMouseMove attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewMouseRightButtonDown(MouseButtonEventArgs)

当某个未处理的 PreviewMouseRightButtonDown 路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled PreviewMouseRightButtonDown routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewMouseRightButtonUp(MouseButtonEventArgs)

当某个未处理的 PreviewMouseRightButtonUp 路由事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled PreviewMouseRightButtonUp routed event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewMouseUp(MouseButtonEventArgs)

当某个未处理的 PreviewMouseUp 附加事件在其路由中到达派生自此类的某个元素时调用。Invoked when an unhandled PreviewMouseUp attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewMouseWheel(MouseWheelEventArgs)

当某个未处理的 PreviewMouseWheel 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewMouseWheel attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewQueryContinueDrag(QueryContinueDragEventArgs)

当某个未处理的 PreviewQueryContinueDrag 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewQueryContinueDrag attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusButtonDown(StylusButtonEventArgs)

当某个未处理的 PreviewStylusButtonDown 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusButtonDown attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusButtonUp(StylusButtonEventArgs)

当某个未处理的 PreviewStylusButtonUp 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusButtonUp attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusDown(StylusDownEventArgs)

当某个未处理的 PreviewStylusDown 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusDown attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusInAirMove(StylusEventArgs)

当某个未处理的 PreviewStylusInAirMove 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusInAirMove attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusInRange(StylusEventArgs)

当某个未处理的 PreviewStylusInRange 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusInRange attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusMove(StylusEventArgs)

当某个未处理的 PreviewStylusMove 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusMove attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusOutOfRange(StylusEventArgs)

当某个未处理的 PreviewStylusOutOfRange 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusOutOfRange attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusSystemGesture(StylusSystemGestureEventArgs)

当某个未处理的 PreviewStylusSystemGesture 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusSystemGesture attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewStylusUp(StylusEventArgs)

当某个未处理的 PreviewStylusUp 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewStylusUp attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewTextInput(TextCompositionEventArgs)

当某个未处理的 PreviewTextInput 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled PreviewTextInput attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnPreviewTouchDown(TouchEventArgs)

为在触摸屏输入按下此元素时发生的 PreviewTouchDown 路由事件提供类处理。Provides class handling for the PreviewTouchDown routed event that occurs when a touch presses this element.

OnPreviewTouchMove(TouchEventArgs)

为在此元素内部移动触摸屏输入时发生的 PreviewTouchMove 路由事件提供类处理。Provides class handling for the PreviewTouchMove routed event that occurs when a touch moves while inside this element.

OnPreviewTouchUp(TouchEventArgs)

为在此元素内部释放触摸屏输入时发生的 PreviewTouchUp 路由事件提供类处理。Provides class handling for the PreviewTouchUp routed event that occurs when a touch is released inside this element.

OnPropertyChanged(DependencyPropertyChangedEventArgs)

每当更新此 DependencyObject 的任何依赖属性的有效值时调用。Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. 更改的特定依赖属性将在事件数据中报告。The specific dependency property that changed is reported in the event data.

(继承自 DependencyObject)
OnQueryContinueDrag(QueryContinueDragEventArgs)

当某个未处理的 QueryContinueDrag 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled QueryContinueDrag attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnQueryCursor(QueryCursorEventArgs)

当某个未处理的 QueryCursor 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled QueryCursor attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusButtonDown(StylusButtonEventArgs)

当某个未处理的 StylusButtonDown 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusButtonDown attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusButtonUp(StylusButtonEventArgs)

当某个未处理的 StylusButtonUp 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusButtonUp attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusDown(StylusDownEventArgs)

当某个未处理的 StylusDown 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusDown attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusEnter(StylusEventArgs)

当此元素引发未处理的 StylusEnter 附加事件时调用。Invoked when an unhandled StylusEnter attached event is raised by this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusInAirMove(StylusEventArgs)

当某个未处理的 StylusInAirMove 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusInAirMove attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusInRange(StylusEventArgs)

当某个未处理的 StylusInRange 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusInRange attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusLeave(StylusEventArgs)

当此元素引发未处理的 StylusLeave 附加事件时调用。Invoked when an unhandled StylusLeave attached event is raised by this element. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusMove(StylusEventArgs)

当某个未处理的 StylusMove 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusMove attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusOutOfRange(StylusEventArgs)

当某个未处理的 StylusOutOfRange 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusOutOfRange attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusSystemGesture(StylusSystemGestureEventArgs)

当某个未处理的 StylusSystemGesture 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusSystemGesture attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnStylusUp(StylusEventArgs)

当某个未处理的 StylusUp 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled StylusUp attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnTextInput(TextCompositionEventArgs)

当某个未处理的 TextInput 附加事件到达派生自此类的其路由中的某个元素时调用。Invoked when an unhandled TextInput attached event reaches an element in its route that is derived from this class. 实现此方法可为此事件添加类处理。Implement this method to add class handling for this event.

OnTouchDown(TouchEventArgs)

为在此元素内按下触摸屏输入时发生的 TouchDown 路由事件提供类处理。Provides class handling for the TouchDown routed event that occurs when a touch presses inside this element.

OnTouchEnter(TouchEventArgs)

为在触摸屏输入从此元素边界外部移动到其内部时发生的 TouchEnter 路由事件提供类处理。Provides class handling for the TouchEnter routed event that occurs when a touch moves from outside to inside the bounds of this element.

OnTouchLeave(TouchEventArgs)

为在触摸屏输入从此元素边界内部移动到其外部时发生的 TouchLeave 路由事件提供类处理。Provides class handling for the TouchLeave routed event that occurs when a touch moves from inside to outside the bounds of this element.

OnTouchMove(TouchEventArgs)

为在此元素内部移动触摸屏输入时发生的 TouchMove 路由事件提供类处理。Provides class handling for the TouchMove routed event that occurs when a touch moves while inside this element.

OnTouchUp(TouchEventArgs)

为在此元素内部释放触摸屏输入时发生的 TouchUp 路由事件提供类处理。Provides class handling for the TouchUp routed event that occurs when a touch is released inside this element.

PredictFocus(FocusNavigationDirection)

当在派生类中重写时,返回将按指定焦点遍历方向接收焦点的元素,而不用实际将焦点移至该元素。When overridden in a derived class, returns the element that would receive focus for a specified focus traversal direction, without actually moving focus to that element.

RaiseEvent(RoutedEventArgs)

引发特定路由事件。Raises a specific routed event. 在提供的 RoutedEventArgs 实例内标识将引发的 RoutedEvent(作为该事件数据的 RoutedEvent 属性)。The RoutedEvent to be raised is identified within the RoutedEventArgs instance that is provided (as the RoutedEvent property of that event data).

ReadLocalValue(DependencyProperty)

如果存在,则返回依赖属性的本地值。Returns the local value of a dependency property, if it exists.

(继承自 DependencyObject)
ReleaseAllTouchCaptures()

从此元素中释放所有捕获的触摸设备。Releases all captured touch devices from this element.

ReleaseMouseCapture()

如果此元素具有鼠标捕获,则释放该捕获。Releases the mouse capture, if this element held the capture.

ReleaseStylusCapture()

如果此元素具有触笔设备捕获,则释放该捕获。Releases the stylus device capture, if this element held the capture.

ReleaseTouchCapture(TouchDevice)

尝试从此元素释放指定触摸设备。Attempts to release the specified touch device from this element.

RemoveHandler(RoutedEvent, Delegate)

从此元素中删除指定的路由事件处理程序。Removes the specified routed event handler from this element.

SetCurrentValue(DependencyProperty, Object)

设置依赖属性的值而不更改其值源。Sets the value of a dependency property without changing its value source.

(继承自 DependencyObject)
SetValue(DependencyProperty, Object)

设置依赖属性的本地值,该值由其依赖属性标识符指定。Sets the local value of a dependency property, specified by its dependency property identifier.

(继承自 DependencyObject)
SetValue(DependencyPropertyKey, Object)

设置一个只读依赖属性的本地值,该值由依赖属性的 DependencyPropertyKey 标识符指定。Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.

(继承自 DependencyObject)
ShouldSerializeCommandBindings()

返回序列化进程是否应在此类的实例上序列化 CommandBindings 属性的内容。Returns whether serialization processes should serialize the contents of the CommandBindings property on instances of this class.

ShouldSerializeInputBindings()

返回序列化进程是否应在此类的实例上序列化 InputBindings 属性的内容。Returns whether serialization processes should serialize the contents of the InputBindings property on instances of this class.

ShouldSerializeProperty(DependencyProperty)

返回一个值,该值指示序列化进程是否应序列化所提供的依赖属性的值。Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.

(继承自 DependencyObject)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
VerifyAccess()

强制调用线程具有此 DispatcherObject 的访问权限。Enforces that the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)

事件

DragEnter

在输入系统报告出现以此元素为拖动目标的基础拖动事件时发生。Occurs when the input system reports an underlying drag event with this element as the drag target.

DragLeave

在输入系统报告出现以此元素为拖动起点的基础拖动事件时发生。Occurs when the input system reports an underlying drag event with this element as the drag origin.

DragOver

在输入系统报告出现以此元素为可能放置目标的基础拖动事件时发生。Occurs when the input system reports an underlying drag event with this element as the potential drop target.

Drop

在输入系统报告出现将此元素作为放置目标的基础放置事件时发生。Occurs when the input system reports an underlying drop event with this element as the drop target.

FocusableChanged

Focusable 属性的值更改时发生。Occurs when the value of the Focusable property changes.

GiveFeedback

在输入系统报告出现涉及此元素的基础拖放操作时发生。Occurs when the input system reports an underlying drag-and-drop event that involves this element.

GotFocus

在此元素获得逻辑焦点时发生。Occurs when this element gets logical focus.

GotKeyboardFocus

在此元素聚焦于键盘时发生。Occurs when the keyboard is focused on this element.

GotMouseCapture

在此元素捕获鼠标时发生。Occurs when this element captures the mouse.

GotStylusCapture

在此元素捕获触笔时发生。Occurs when this element captures the stylus.

GotTouchCapture

在此元素上捕获触摸屏输入时发生。Occurs when a touch is captured to this element.

IsEnabledChanged

在此元素的 IsEnabled 属性值更改时发生。Occurs when the value of the IsEnabled property on this element changes.

IsKeyboardFocusedChanged

在此元素的 IsKeyboardFocused 属性值更改时发生。Occurs when the value of the IsKeyboardFocused property changes on this element.

IsKeyboardFocusWithinChanged

在此元素的 IsKeyboardFocusWithinChanged 属性值更改时发生。Occurs when the value of the IsKeyboardFocusWithinChanged property changes on this element.

IsMouseCapturedChanged

在此元素的 IsMouseCaptured 属性值更改时发生。Occurs when the value of the IsMouseCaptured property changes on this element.

IsMouseCaptureWithinChanged

在此元素的 IsMouseCaptureWithinProperty 值更改时发生。Occurs when the value of the IsMouseCaptureWithinProperty changes on this element.

IsMouseDirectlyOverChanged

在此元素的 IsMouseDirectlyOver 属性值更改时发生。Occurs when the value of the IsMouseDirectlyOver property changes on this element.

IsStylusCapturedChanged

在此元素的 IsStylusCaptured 属性值更改时发生。Occurs when the value of the IsStylusCaptured property changes on this element.

IsStylusCaptureWithinChanged

在此元素的 IsStylusCaptureWithin 属性值更改时发生。Occurs when the value of the IsStylusCaptureWithin property changes on this element.

IsStylusDirectlyOverChanged

在此元素的 IsStylusDirectlyOver 属性值更改时发生。Occurs when the value of the IsStylusDirectlyOver property changes on this element.

KeyDown

当焦点在该元素上时按下某个键后发生。Occurs when a key is pressed while focus is on this element.

KeyUp

当焦点在该元素上时松开某个键后发生。Occurs when a key is released while focus is on this element.

LostFocus

在此元素丢失逻辑焦点时发生。Occurs when this element loses logical focus.

LostKeyboardFocus

在此元素不再聚焦于键盘时发生。Occurs when the keyboard is no longer focused on this element.

LostMouseCapture

在此元素丢失鼠标捕获时发生。Occurs when this element loses mouse capture.

LostStylusCapture

在此元素丢失触笔捕获时发生。Occurs when this element loses stylus capture.

LostTouchCapture

在此元素失去触摸屏输入捕获时发生。Occurs when this element loses a touch capture.

MouseDown

在指针位于此元素上并且按下任意鼠标按钮时发生。Occurs when any mouse button is pressed while the pointer is over this element.

MouseEnter

在鼠标指针进入此元素的边界时发生。Occurs when the mouse pointer enters the bounds of this element.

MouseLeave

在鼠标指针离开此元素的边界时发生。Occurs when the mouse pointer leaves the bounds of this element.

MouseLeftButtonDown

在鼠标指针位于此元素上并且按下鼠标左键时发生。Occurs when the left mouse button is pressed while the mouse pointer is over this element.

MouseLeftButtonUp

在鼠标指针位于此元素上并且松开鼠标左键时发生。Occurs when the left mouse button is released while the mouse pointer is over this element.

MouseMove

在鼠标指针位于此元素上并且移动鼠标指针时发生。Occurs when the mouse pointer moves while over this element.

MouseRightButtonDown

在鼠标指针位于此元素上并且按下鼠标右键时发生。Occurs when the right mouse button is pressed while the mouse pointer is over this element.

MouseRightButtonUp

在鼠标指针位于此元素上并且松开鼠标右键时发生。Occurs when the right mouse button is released while the mouse pointer is over this element.

MouseUp

在鼠标指针位于此元素上并且松开任意鼠标按钮时发生。Occurs when any mouse button is released over this element.

MouseWheel

在鼠标指针位于此元素上并且用户滚动鼠标滚轮时发生。Occurs when the user rotates the mouse wheel while the mouse pointer is over this element.

PreviewDragEnter

在输入系统报告出现以此元素为拖动目标的基础拖动事件时发生。Occurs when the input system reports an underlying drag event with this element as the drag target.

PreviewDragLeave

在输入系统报告出现以此元素为拖动起点的基础拖动事件时发生。Occurs when the input system reports an underlying drag event with this element as the drag origin.

PreviewDragOver

在输入系统报告出现以此元素为可能放置目标的基础拖动事件时发生。Occurs when the input system reports an underlying drag event with this element as the potential drop target.

PreviewDrop

在输入系统报告出现将此元素作为放置目标的基础放置事件时发生。Occurs when the input system reports an underlying drop event with this element as the drop target.

PreviewGiveFeedback

在开始拖放操作时发生。Occurs when a drag-and-drop operation is started.

PreviewGotKeyboardFocus

在此元素聚焦于键盘时发生。Occurs when the keyboard is focused on this element.

PreviewKeyDown

在此元素聚焦于键盘并且按下某个键时发生。Occurs when a key is pressed while the keyboard is focused on this element.

PreviewKeyUp

在此元素聚焦于键盘并且松开某个键时发生。Occurs when a key is released while the keyboard is focused on this element.

PreviewLostKeyboardFocus

在此元素不再聚焦于键盘时发生。Occurs when the keyboard is no longer focused on this element.

PreviewMouseDown

在指针位于此元素上并且按下任意鼠标按钮时发生。Occurs when any mouse button is pressed while the pointer is over this element.

PreviewMouseLeftButtonDown

在鼠标指针位于此元素上并且按下鼠标左键时发生。Occurs when the left mouse button is pressed while the mouse pointer is over this element.

PreviewMouseLeftButtonUp

在鼠标指针位于此元素上并且松开鼠标左键时发生。Occurs when the left mouse button is released while the mouse pointer is over this element.

PreviewMouseMove

在鼠标指针位于此元素上并且移动鼠标指针时发生。Occurs when the mouse pointer moves while the mouse pointer is over this element.

PreviewMouseRightButtonDown

在鼠标指针位于此元素上并且按下鼠标右键时发生。Occurs when the right mouse button is pressed while the mouse pointer is over this element.

PreviewMouseRightButtonUp

在鼠标指针位于此元素上并且松开鼠标右键时发生。Occurs when the right mouse button is released while the mouse pointer is over this element.

PreviewMouseUp

在鼠标指针位于此元素上并且松开任意鼠标按钮时发生。Occurs when any mouse button is released while the mouse pointer is over this element.

PreviewMouseWheel

在鼠标指针位于此元素上并且用户滚动鼠标滚轮时发生。Occurs when the user rotates the mouse wheel while the mouse pointer is over this element.

PreviewQueryContinueDrag

在拖放操作期间键盘或鼠标按钮的状态改变时发生。Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation.

PreviewStylusButtonDown

在指针位于此元素上并且按下触笔按钮时发生。Occurs when the stylus button is pressed while the pointer is over this element.

PreviewStylusButtonUp

在指针位于此元素上并且松开触笔按钮时发生。Occurs when the stylus button is released while the pointer is over this element.

PreviewStylusDown

当触笔位于元素上且触及数字化器时发生。Occurs when the stylus touches the digitizer while it is over this element.

PreviewStylusInAirMove

在触笔掠过元素但并未实际接触数字化器时发生。Occurs when the stylus moves over an element without actually touching the digitizer.

PreviewStylusInRange

在触笔位于此元素上并且触笔与数字化器之间的距离近到足以检测到触笔时发生。Occurs when the stylus is close enough to the digitizer to be detected, while over this element.

PreviewStylusMove

在触笔位于元素上并且移动触笔时发生。Occurs when the stylus moves while over the element. 数字化器在检测触笔时,触笔必须处于移动状态才会引发此事件,否则将改为引发 PreviewStylusInAirMoveThe stylus must move while being detected by the digitizer to raise this event, otherwise, PreviewStylusInAirMove is raised instead.

PreviewStylusOutOfRange

在触笔与数字化仪之间的距离太远以致无法检测到触笔时发生。Occurs when the stylus is too far from the digitizer to be detected.

PreviewStylusSystemGesture

在用户采用某一种触笔笔势时发生。Occurs when a user performs one of several stylus gestures.

PreviewStylusUp

当触笔位于此元素上并且用户将触笔抬离数字化器时发生。Occurs when the user raises the stylus off the digitizer while the stylus is over this element.

PreviewTextInput

在此元素以设备无关模式获取文本时发生。Occurs when this element gets text in a device-independent manner.

PreviewTouchDown

当悬停在此元素上方的手指触摸屏幕时发生。Occurs when a finger touches the screen while the finger is over this element.

PreviewTouchMove

当悬停在此元素上方的手指在屏幕上移动时发生。Occurs when a finger moves on the screen while the finger is over this element.

PreviewTouchUp

当悬停在此元素上方的手指从屏幕上移开时发生。Occurs when a finger is raised off of the screen while the finger is over this element.

QueryContinueDrag

在拖放操作期间键盘或鼠标按钮的状态改变时发生。Occurs when there is a change in the keyboard or mouse button state during a drag-and-drop operation.

QueryCursor

当请求显示光标时发生。Occurs when the cursor is requested to display. 每次鼠标指针移至新位置时都会在一个元素上引发此事件,这意味着光标对象可能需要根据其新位置进行更改。This event is raised on an element each time that the mouse pointer moves to a new location, which means the cursor object might need to be changed based on its new position.

StylusButtonDown

在指针位于此元素上并且按下触笔按钮时发生。Occurs when the stylus button is pressed while the pointer is over this element.

StylusButtonUp

在指针位于此元素上并且松开触笔按钮时发生。Occurs when the stylus button is released while the pointer is over this element.

StylusDown

在触笔位于此元素上且同时触及数字化器时发生。Occurs when the stylus touches the digitizer while the stylus is over this element.

StylusEnter

在触笔进入此元素的边界时发生。Occurs when the stylus enters the bounds of this element.

StylusInAirMove

在触笔掠过元素但并未实际接触数字化器时发生。Occurs when the stylus moves over an element without actually touching the digitizer.

StylusInRange

在触笔位于此元素上并且触笔与数字化器之间的距离近到足以检测到触笔时发生。Occurs when the stylus is close enough to the digitizer to be detected, while over this element.

StylusLeave

在触笔离开元素的边界时发生。Occurs when the stylus leaves the bounds of the element.

StylusMove

在触笔移到此元素上时发生。Occurs when the stylus moves over this element. 触笔必须在位于数字化器上时移动,才会引发此事件。The stylus must move while on the digitizer to raise this event. 否则将改为引发 StylusInAirMoveOtherwise, StylusInAirMove is raised instead.

StylusOutOfRange

在触笔位于此元素上并且触笔与数字化器之间的距离太远以致无法检测到触笔时发生。Occurs when the stylus is too far from the digitizer to be detected, while over this element.

StylusSystemGesture

在用户采用某一种触笔笔势时发生。Occurs when a user performs one of several stylus gestures.

StylusUp

当触笔位于此元素上并且用户将触笔抬离数字化器时发生。Occurs when the user raises the stylus off the digitizer while it is over this element.

TextInput

在此元素以设备无关模式获取文本时发生。Occurs when this element gets text in a device-independent manner.

TouchDown

当悬停在此元素上方的手指触摸屏幕时发生。Occurs when a finger touches the screen while the finger is over this element.

TouchEnter

在触摸屏输入从此元素边界外部移动到其内部时发生。Occurs when a touch moves from outside to inside the bounds of this element.

TouchLeave

在触摸屏输入从此元素边界内部移动到其外部时发生。Occurs when a touch moves from inside to outside the bounds of this element.

TouchMove

当悬停在此元素上方的手指在屏幕上移动时发生。Occurs when a finger moves on the screen while the finger is over this element.

TouchUp

当悬停在此元素上方的手指从屏幕上移开时发生。Occurs when a finger is raised off of the screen while the finger is over this element.

适用于

另请参阅