语言

UIElement3D 类

定义

UIElement3D 是基于 Windows Presentation Foundation (WPF) 元素和基本呈现特征构建的 WPF 核心级别实现的基类。

public ref class UIElement3D abstract : System::Windows::Media::Media3D::Visual3D, System::Windows::IInputElement
public abstract class UIElement3D : System.Windows.Media.Media3D.Visual3D, System.Windows.IInputElement
type UIElement3D = class
    inherit Visual3D
    interface IInputElement
Public MustInherit Class UIElement3D
Inherits Visual3D
Implements IInputElement
继承
派生
实现

示例

以下示例演示如何从 UIElement3D 类派生以创建 Sphere 类:

public class Sphere : UIElement3D
{
    // OnUpdateModel is called in response to InvalidateModel and provides
    // a place to set the Visual3DModel property.
    // 
    // Setting Visual3DModel does not provide parenting information, which
    // is needed for data binding, styling, and other features. Similarly, creating render data
    // in 2-D does not provide the connections either.
    // 
    // To get around this, we create a Model dependency property which
    // sets this value.  The Model DP then causes the correct connections to occur
    // and the above features to work correctly.
    // 
    // In this update model we retessellate the sphere based on the current
    // dependency property values, and then set it as the model.  The brush
    // color is blue by default, but the code can easily be updated to let
    // this be set by the user.

    protected override void OnUpdateModel()
    {
        GeometryModel3D model = new GeometryModel3D();

        model.Geometry = Tessellate(ThetaDiv, PhiDiv, Radius);
        model.Material = new DiffuseMaterial(System.Windows.Media.Brushes.Blue);

        Model = model;
    }

    // The Model property for the sphere
    private static readonly DependencyProperty ModelProperty =
        DependencyProperty.Register("Model",
                                    typeof(Model3D),
                                    typeof(Sphere),
                                    new PropertyMetadata(ModelPropertyChanged));

    private static void ModelPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        Sphere s = (Sphere)d;
        s.Visual3DModel = s.Model;
    }

    private Model3D Model
    {
        get
        {
            return (Model3D)GetValue(ModelProperty);
        }

        set
        {
            SetValue(ModelProperty, value);
        }
    }

    // The number of divisions to make in the theta direction on the sphere
    public static readonly DependencyProperty ThetaDivProperty =
        DependencyProperty.Register("ThetaDiv",
                                    typeof(int),
                                    typeof(Sphere),
                                    new PropertyMetadata(15, ThetaDivPropertyChanged));

    private static void ThetaDivPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        Sphere s = (Sphere)d;
        s.InvalidateModel();
    }

    public int ThetaDiv
    {
        get
        {
            return (int)GetValue(ThetaDivProperty);
        }

        set
        {
            SetValue(ThetaDivProperty, value);
        }
    }

    // The number of divisions to make in the phi direction on the sphere
    public static readonly DependencyProperty PhiDivProperty =
        DependencyProperty.Register("PhiDiv",
                                    typeof(int),
                                    typeof(Sphere),
                                    new PropertyMetadata(15, PhiDivPropertyChanged));

    private static void PhiDivPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        Sphere s = (Sphere)d;
        s.InvalidateModel();
    }

    public int PhiDiv
    {
        get
        {
            return (int)GetValue(PhiDivProperty);
        }

        set
        {
            SetValue(PhiDivProperty, value);
        }
    }

    // The radius of the sphere
    public static readonly DependencyProperty RadiusProperty =
        DependencyProperty.Register("Radius",
                                    typeof(double),
                                    typeof(Sphere),
                                    new PropertyMetadata(1.0, RadiusPropertyChanged));

    private static void RadiusPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        Sphere s = (Sphere)d;
        s.InvalidateModel();
    }

    public double Radius
    {
        get
        {
            return (double)GetValue(RadiusProperty);
        }

        set
        {
            SetValue(RadiusProperty, value);
        }
    }

    // Private helper methods
    private static Point3D GetPosition(double theta, double phi, double radius)
    {
        double x = radius * Math.Sin(theta) * Math.Sin(phi);
        double y = radius * Math.Cos(phi);
        double z = radius * Math.Cos(theta) * Math.Sin(phi);

        return new Point3D(x, y, z);
    }

    private static Vector3D GetNormal(double theta, double phi)
    {
        return (Vector3D)GetPosition(theta, phi, 1.0);
    }

    private static double DegToRad(double degrees)
    {
        return (degrees / 180.0) * Math.PI;
    }

    private static System.Windows.Point GetTextureCoordinate(double theta, double phi)
    {
        System.Windows.Point p = new System.Windows.Point(theta / (2 * Math.PI),
                            phi / (Math.PI));

        return p;
    }

    // Tesselates the sphere and returns a MeshGeometry3D representing the 
    // tessellation based on the given parameters
    internal static MeshGeometry3D Tessellate(int tDiv, int pDiv, double radius)
    {            
        double dt = DegToRad(360.0) / tDiv;
        double dp = DegToRad(180.0) / pDiv;

        MeshGeometry3D mesh = new MeshGeometry3D();

        for (int pi = 0; pi <= pDiv; pi++)
        {
            double phi = pi * dp;

            for (int ti = 0; ti <= tDiv; ti++)
            {
                // we want to start the mesh on the x axis
                double theta = ti * dt;

                mesh.Positions.Add(GetPosition(theta, phi, radius));
                mesh.Normals.Add(GetNormal(theta, phi));
                mesh.TextureCoordinates.Add(GetTextureCoordinate(theta, phi));
            }
        }

        for (int pi = 0; pi < pDiv; pi++)
        {
            for (int ti = 0; ti < tDiv; ti++)
            {
                int x0 = ti;
                int x1 = (ti + 1);
                int y0 = pi * (tDiv + 1);
                int y1 = (pi + 1) * (tDiv + 1);

                mesh.TriangleIndices.Add(x0 + y0);
                mesh.TriangleIndices.Add(x0 + y1);
                mesh.TriangleIndices.Add(x1 + y0);

                mesh.TriangleIndices.Add(x1 + y0);
                mesh.TriangleIndices.Add(x0 + y1);
                mesh.TriangleIndices.Add(x1 + y1);
            }
        }

        mesh.Freeze();
        return mesh;
    }
}
Public Class Sphere
    Inherits UIElement3D
    ' OnUpdateModel is called in response to InvalidateModel and provides
    ' a place to set the Visual3DModel property.
    ' 
    ' Setting Visual3DModel does not provide parenting information, which
    ' is needed for data binding, styling, and other features. Similarly, creating render data
    ' in 2-D does not provide the connections either.
    ' 
    ' To get around this, we create a Model dependency property which
    ' sets this value.  The Model DP then causes the correct connections to occur
    ' and the above features to work correctly.
    ' 
    ' In this update model we retessellate the sphere based on the current
    ' dependency property values, and then set it as the model.  The brush
    ' color is blue by default, but the code can easily be updated to let
    ' this be set by the user.

    Protected Overrides Sub OnUpdateModel()
        Dim model As New GeometryModel3D()

        model.Geometry = Tessellate(ThetaDiv, PhiDiv, Radius)
        model.Material = New DiffuseMaterial(System.Windows.Media.Brushes.Blue)

        Me.Model = model
    End Sub

    ' The Model property for the sphere
    Private Shared ReadOnly ModelProperty As DependencyProperty = DependencyProperty.Register("Model", GetType(Model3D), GetType(Sphere), New PropertyMetadata(AddressOf ModelPropertyChanged))

    Private Shared Sub ModelPropertyChanged(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
        Dim s As Sphere = CType(d, Sphere)
        s.Visual3DModel = s.Model
    End Sub

    Private Property Model() As Model3D
        Get
            Return CType(GetValue(ModelProperty), Model3D)
        End Get

        Set(ByVal value As Model3D)
            SetValue(ModelProperty, value)
        End Set
    End Property

    ' The number of divisions to make in the theta direction on the sphere
    Public Shared ReadOnly ThetaDivProperty As DependencyProperty = DependencyProperty.Register("ThetaDiv", GetType(Integer), GetType(Sphere), New PropertyMetadata(15, AddressOf ThetaDivPropertyChanged))

    Private Shared Sub ThetaDivPropertyChanged(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
        Dim s As Sphere = CType(d, Sphere)
        s.InvalidateModel()
    End Sub

    Public Property ThetaDiv() As Integer
        Get
            Return CInt(GetValue(ThetaDivProperty))
        End Get

        Set(ByVal value As Integer)
            SetValue(ThetaDivProperty, value)
        End Set
    End Property

    ' The number of divisions to make in the phi direction on the sphere
    Public Shared ReadOnly PhiDivProperty As DependencyProperty = DependencyProperty.Register("PhiDiv", GetType(Integer), GetType(Sphere), New PropertyMetadata(15, AddressOf PhiDivPropertyChanged))

    Private Shared Sub PhiDivPropertyChanged(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
        Dim s As Sphere = CType(d, Sphere)
        s.InvalidateModel()
    End Sub

    Public Property PhiDiv() As Integer
        Get
            Return CInt(GetValue(PhiDivProperty))
        End Get

        Set(ByVal value As Integer)
            SetValue(PhiDivProperty, value)
        End Set
    End Property

    ' The radius of the sphere
    Public Shared ReadOnly RadiusProperty As DependencyProperty = DependencyProperty.Register("Radius", GetType(Double), GetType(Sphere), New PropertyMetadata(1.0, AddressOf RadiusPropertyChanged))

    Private Shared Sub RadiusPropertyChanged(ByVal d As DependencyObject, ByVal e As DependencyPropertyChangedEventArgs)
        Dim s As Sphere = CType(d, Sphere)
        s.InvalidateModel()
    End Sub

    Public Property Radius() As Double
        Get
            Return CDbl(GetValue(RadiusProperty))
        End Get

        Set(ByVal value As Double)
            SetValue(RadiusProperty, value)
        End Set
    End Property

    ' Private helper methods
    Private Shared Function GetPosition(ByVal theta As Double, ByVal phi As Double, ByVal radius As Double) As Point3D
        Dim x As Double = radius * Math.Sin(theta) * Math.Sin(phi)
        Dim y As Double = radius * Math.Cos(phi)
        Dim z As Double = radius * Math.Cos(theta) * Math.Sin(phi)

        Return New Point3D(x, y, z)
    End Function

    Private Shared Function GetNormal(ByVal theta As Double, ByVal phi As Double) As Vector3D
        Return CType(GetPosition(theta, phi, 1.0), Vector3D)
    End Function

    Private Shared Function DegToRad(ByVal degrees As Double) As Double
        Return (degrees / 180.0) * Math.PI
    End Function

    Private Shared Function GetTextureCoordinate(ByVal theta As Double, ByVal phi As Double) As System.Windows.Point
        Dim p As New System.Windows.Point(theta / (2 * Math.PI), phi / (Math.PI))

        Return p
    End Function

    ' Tesselates the sphere and returns a MeshGeometry3D representing the 
    ' tessellation based on the given parameters
    Friend Shared Function Tessellate(ByVal tDiv As Integer, ByVal pDiv As Integer, ByVal radius As Double) As MeshGeometry3D
        Dim dt As Double = DegToRad(360.0) / tDiv
        Dim dp As Double = DegToRad(180.0) / pDiv

        Dim mesh As New MeshGeometry3D()

        For pi As Integer = 0 To pDiv
            Dim phi As Double = pi * dp

            For ti As Integer = 0 To tDiv
                ' we want to start the mesh on the x axis
                Dim theta As Double = ti * dt

                mesh.Positions.Add(GetPosition(theta, phi, radius))
                mesh.Normals.Add(GetNormal(theta, phi))
                mesh.TextureCoordinates.Add(GetTextureCoordinate(theta, phi))
            Next ti
        Next pi

        For pi As Integer = 0 To pDiv - 1
            For ti As Integer = 0 To tDiv - 1
                Dim x0 As Integer = ti
                Dim x1 As Integer = (ti + 1)
                Dim y0 As Integer = pi * (tDiv + 1)
                Dim y1 As Integer = (pi + 1) * (tDiv + 1)

                mesh.TriangleIndices.Add(x0 + y0)
                mesh.TriangleIndices.Add(x0 + y1)
                mesh.TriangleIndices.Add(x1 + y0)

                mesh.TriangleIndices.Add(x1 + y0)
                mesh.TriangleIndices.Add(x0 + y1)
                mesh.TriangleIndices.Add(x1 + y1)
            Next ti
        Next pi

        mesh.Freeze()
        Return mesh
    End Function
End Class

注解

UIElement3D 是一个抽象基类,可以从中派生类来表示特定的 3D 元素。

类中 UIElement3D 定义了 3D 元素的大部分输入、聚焦和事件行为。 这包括键盘、鼠标和触笔输入和相关状态属性的事件。 其中许多事件都是路由事件,许多与输入相关的事件既具有浮泡路由版本,也有事件的隧道版本。 这些配对事件通常是控制作者最感兴趣的事件。

UIElement3D还包括与WPF事件模型相关的 API,包括可以引发来自元素实例的指定路由事件的方法。

A UIElement3D 具有以下由类专门定义的 UIElement3D 功能:

  • 可以响应用户输入(包括控制通过处理事件路由或命令路由发送输入的位置)。
  • 可以引发通过逻辑元素树传递路由的路由事件。

Important

Visibility 状态会影响该元素的所有输入处理。 不可见的元素不参与命中测试,并且不接收输入事件,即使鼠标位于元素的边界上(如果可见)。

与 UIElement 类不同,该 UIElement3D 类不包含布局。 因此,该 UIElement3D 类不包括 Measure 或 Arrange 方法。

一个通过重写UIElement3DVisual3D派生GetVisual3DChild并维护其自己的对象集合的Visual3DChildrenCount类,并且仍必须将新Visual3D对象AddVisual3DChild传递给 。

.NET Framework 版本 3.5 中引入了 UIElement3D。 有关详细信息,请参阅 版本和依赖项。

构造函数

名称 说明
UIElement3D()

初始化 UIElement3D 类的新实例。

字段

名称 说明
AllowDropProperty

标识 AllowDrop 依赖属性。

AreAnyTouchesCapturedProperty

标识 AreAnyTouchesCaptured 依赖属性。

AreAnyTouchesCapturedWithinProperty

标识 AreAnyTouchesCapturedWithin 依赖属性。

AreAnyTouchesDirectlyOverProperty

标识 AreAnyTouchesDirectlyOver 依赖属性。

AreAnyTouchesOverProperty

标识 AreAnyTouchesOver 依赖属性。

DragEnterEvent

标识 DragEnter 路由事件。

DragLeaveEvent

标识 DragLeave 路由事件。

DragOverEvent

标识 DragOver 路由事件。

DropEvent

标识 Drop 路由事件。

FocusableProperty

标识 Focusable 依赖属性。

GiveFeedbackEvent

标识 GiveFeedback 路由事件。

GotFocusEvent

标识 GotFocus 路由事件。

GotKeyboardFocusEvent

标识 GotKeyboardFocus 路由事件。

GotMouseCaptureEvent

标识 GotMouseCapture 路由事件。

GotStylusCaptureEvent

标识 GotStylusCapture 路由事件。

GotTouchCaptureEvent

标识 GotTouchCapture 路由事件。

IsEnabledProperty

标识 IsEnabled 依赖属性。

IsFocusedProperty

标识 IsFocused 依赖属性。

IsHitTestVisibleProperty

标识 IsHitTestVisible 依赖属性。

IsKeyboardFocusedProperty

标识 IsKeyboardFocused 依赖属性。

IsKeyboardFocusWithinProperty

标识 IsKeyboardFocusWithin 依赖属性。

IsMouseCapturedProperty

标识 IsMouseCaptured 依赖属性。

IsMouseCaptureWithinProperty

标识 IsMouseCaptureWithin 依赖属性。

IsMouseDirectlyOverProperty

标识 IsMouseDirectlyOver 依赖属性。

IsMouseOverProperty

标识 IsMouseOver 依赖属性。

IsStylusCapturedProperty

标识 IsStylusCaptured 依赖属性。

IsStylusCaptureWithinProperty

标识 IsStylusCaptureWithin 依赖属性。

IsStylusDirectlyOverProperty

标识 IsStylusDirectlyOver 依赖属性。

IsStylusOverProperty

标识 IsStylusOver 依赖属性。

IsVisibleProperty

标识 IsVisible 依赖属性。

KeyDownEvent

标识 KeyDown 路由事件。

KeyUpEvent

标识 KeyUp 路由事件。

LostFocusEvent

标识 LostFocus 路由事件。

LostKeyboardFocusEvent

标识 LostKeyboardFocus 路由事件。

LostMouseCaptureEvent

标识 LostMouseCapture 路由事件。

LostStylusCaptureEvent

标识 LostStylusCapture 路由事件。

LostTouchCaptureEvent

标识 LostTouchCapture 路由事件。

MouseDownEvent

标识 MouseDown 路由事件。

MouseEnterEvent

标识 MouseEnter 路由事件。

MouseLeaveEvent

标识 MouseLeave 路由事件。

MouseLeftButtonDownEvent

标识 MouseLeftButtonDown 路由事件。

MouseLeftButtonUpEvent

标识 MouseLeftButtonUp 路由事件。

MouseMoveEvent

标识 MouseMove 路由事件。

MouseRightButtonDownEvent

标识 MouseRightButtonDown 路由事件。

MouseRightButtonUpEvent

标识 MouseRightButtonUp 路由事件。

MouseUpEvent

标识 MouseUp 路由事件。

MouseWheelEvent

标识 MouseWheel 路由事件。

PreviewDragEnterEvent

标识 PreviewDragEnter 路由事件。

PreviewDragLeaveEvent

标识 PreviewDragLeave 路由事件。

PreviewDragOverEvent

标识 PreviewDragOver 路由事件。

PreviewDropEvent

标识 PreviewDrop 路由事件。

PreviewGiveFeedbackEvent

标识 PreviewGiveFeedback 路由事件。

PreviewGotKeyboardFocusEvent

标识 PreviewGotKeyboardFocus 路由事件。

PreviewKeyDownEvent

标识 PreviewKeyDown 路由事件。

PreviewKeyUpEvent

标识 PreviewKeyUp 路由事件。

PreviewLostKeyboardFocusEvent

标识 PreviewLostKeyboardFocus 路由事件。

PreviewMouseDownEvent

标识 PreviewMouseDown 路由事件。

PreviewMouseLeftButtonDownEvent

标识 PreviewMouseLeftButtonDown 路由事件。

PreviewMouseLeftButtonUpEvent

标识 PreviewMouseLeftButtonUp 路由事件。

PreviewMouseMoveEvent

标识 PreviewMouseMove 路由事件。

PreviewMouseRightButtonDownEvent

标识 PreviewMouseRightButtonDown 路由事件。

PreviewMouseRightButtonUpEvent

标识 PreviewMouseRightButtonUp 路由事件。

PreviewMouseUpEvent

标识 PreviewMouseUp 路由事件。

PreviewMouseWheelEvent

标识 PreviewMouseWheel 路由事件。

PreviewQueryContinueDragEvent

标识 PreviewQueryContinueDrag 路由事件。

PreviewStylusButtonDownEvent

标识 PreviewStylusButtonDown 路由事件。

PreviewStylusButtonUpEvent

标识 PreviewStylusButtonUp 路由事件。

PreviewStylusDownEvent

标识 PreviewStylusDown 路由事件。

PreviewStylusInAirMoveEvent

标识 PreviewStylusInAirMove 路由事件。

PreviewStylusInRangeEvent

标识 PreviewStylusInRange 路由事件。

PreviewStylusMoveEvent

标识 PreviewStylusMove 路由事件。

PreviewStylusOutOfRangeEvent

标识 PreviewStylusOutOfRange 路由事件。

PreviewStylusSystemGestureEvent

标识 PreviewStylusSystemGesture 路由事件。

PreviewStylusUpEvent

标识 PreviewStylusUp 路由事件。

PreviewTextInputEvent

标识 PreviewTextInput 路由事件。

PreviewTouchDownEvent

标识 PreviewTouchDown 路由事件。

PreviewTouchMoveEvent

标识 PreviewTouchMove 路由事件。

PreviewTouchUpEvent

标识 PreviewTouchUp 路由事件。

QueryContinueDragEvent

标识 QueryContinueDrag 路由事件。

QueryCursorEvent

标识 QueryCursor 路由事件。

StylusButtonDownEvent

标识 StylusButtonDown 路由事件。

StylusButtonUpEvent

标识 StylusButtonUp 路由事件。

StylusDownEvent

标识 StylusDown 路由事件。

StylusEnterEvent

标识 StylusEnter 路由事件。

StylusInAirMoveEvent

标识 StylusInAirMove 路由事件。

StylusInRangeEvent

标识 StylusInRange 路由事件。

StylusLeaveEvent

标识 StylusLeave 路由事件。

StylusMoveEvent

标识 StylusMove 路由事件。

StylusOutOfRangeEvent

标识 StylusOutOfRange 路由事件。

StylusSystemGestureEvent

标识 StylusSystemGesture 路由事件。

StylusUpEvent

标识 StylusUp 路由事件。

TextInputEvent

标识 TextInput 路由事件。

TouchDownEvent

标识 TouchDown 路由事件。

TouchEnterEvent

标识 TouchEnter 路由事件。

TouchLeaveEvent

标识 TouchLeave 路由事件。

TouchMoveEvent

标识 TouchMove 路由事件。

TouchUpEvent

标识 TouchUp 路由事件。

VisibilityProperty

标识 Visibility 依赖属性。

属性

名称 说明
AllowDrop

获取或设置一个值,该值指示此元素是否可以用作拖放操作的目标。

AreAnyTouchesCaptured

获取一个值,该值指示是否至少捕获到此元素的一个触摸。

AreAnyTouchesCapturedWithin

获取一个值,该值指示是否至少捕获一个触摸到此元素或其可视化树中的任何子元素。

AreAnyTouchesDirectlyOver

获取一个值,该值指示是否在此元素上按下至少一次触摸。

AreAnyTouchesOver

获取一个值,该值指示是否在该元素或其可视化树中的任何子元素上按下至少一个触摸。

CommandBindings

获取与此元素关联的对象的集合 CommandBinding 。

DependencyObjectType

获取包装 DependencyObjectType 此实例的 CLR 类型。

(继承自 DependencyObject)
Dispatcher

获取与此DispatcherDispatcherObject关联的值。

(继承自 DispatcherObject)
Focusable

获取或设置一个值,该值指示元素是否可以接收焦点。

HasAnimatedProperties

获取一个值,该值指示这 Visual3D 是否具有任何动画属性。

(继承自 Visual3D)
InputBindings

获取与此元素关联的输入绑定的集合。

IsEnabled

获取或设置一个值,该值指示是否在用户界面(UI)中启用此元素。

IsEnabledCore

获取一个值,该值将成为派生类中的返回值 IsEnabled 。

IsFocused

获取一个值,该值确定此元素是否具有逻辑焦点。

IsHitTestVisible

获取或设置一个值,该值声明此元素是否可以作为其呈现内容的某些部分的命中测试结果返回。

IsInputMethodEnabled

获取一个值,该值指示是否启用输入法系统(如输入法编辑器(IME)来处理此元素的输入。

IsKeyboardFocused

获取一个值,该值指示此元素是否具有键盘焦点。

IsKeyboardFocusWithin

获取一个值,该值指示键盘焦点是元素或其可视化树子元素中的任意位置。

IsMouseCaptured

获取一个值,该值指示是否将鼠标捕获到此元素。

IsMouseCaptureWithin

获取一个值,该值确定鼠标捕获是由此元素还是由其可视化树中的子元素保存。

IsMouseDirectlyOver

获取一个值,该值指示鼠标指针的位置是否对应于命中测试结果,这将考虑元素组合。

IsMouseOver

获取一个值,该值指示鼠标指针是否位于此元素上(包括可视化树中的子元素)。

IsSealed

获取一个值,该值指示此实例当前是否密封(只读)。

(继承自 DependencyObject)
IsStylusCaptured

获取一个值,该值指示触笔是否由此元素捕获。

IsStylusCaptureWithin

获取一个值,该值确定触笔捕获是由此元素保留的,还是由元素边界及其可视化树中的元素保存。

IsStylusDirectlyOver

获取一个值,该值指示触笔位置是否对应于命中测试结果,这将考虑元素组合。

IsStylusOver

获取一个值,该值指示触笔游标是否位于此元素上(包括可视子元素)。

IsVisible

获取一个值,该值指示此元素是否在用户界面(UI)中可见。

TouchesCaptured

获取捕获到此元素的所有触摸设备。

TouchesCapturedWithin

获取捕获到此元素的所有触摸设备或其可视化树中的任何子元素。

TouchesDirectlyOver

获取此元素上的所有触摸设备。

TouchesOver

获取位于此元素上的所有触摸设备或其可视化树中的任何子元素。

Transform

获取或设置应用于三维对象的转换。

(继承自 Visual3D)
Visibility

获取或设置此元素的用户界面(UI)可见性。

Visual3DChildrenCount

获取对象的子元素 Visual3D 数。

(继承自 Visual3D)
Visual3DModel

获取或设置 Model3D 要呈现的对象。

(继承自 Visual3D)

方法

名称 说明
AddHandler(RoutedEvent, Delegate, Boolean)

为指定的路由事件添加路由事件处理程序,将处理程序添加到当前元素上的处理程序集合。 handledEventsToo指定true为已标记为由事件路由上的另一个元素处理的路由事件调用提供的处理程序。

AddHandler(RoutedEvent, Delegate)

为指定的路由事件添加路由事件处理程序,将处理程序添加到当前元素上的处理程序集合。

AddToEventRoute(EventRoute, RoutedEventArgs)

将处理程序添加到为当前EventRoute事件处理程序集合指定的UIElement3D处理程序。

AddVisual3DChild(Visual3D)

定义两个三维视觉对象之间的父子关系。

(继承自 Visual3D)
ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior)

将给定 AnimationClock 的效果应用于给定的依赖属性。 新 AnimationClock 动画对任何当前动画的影响取决于参数的值 handoffBehavior 。

(继承自 Visual3D)
ApplyAnimationClock(DependencyProperty, AnimationClock)

将给定 AnimationClock 的效果应用于给定的依赖属性。

(继承自 Visual3D)
BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)

根据指定对象和DependencyProperty对象AnimationTimeline启动动画序列HandoffBehavior。

(继承自 Visual3D)
BeginAnimation(DependencyProperty, AnimationTimeline)

根据指定的DependencyProperty对象启动动画序列AnimationTimeline。

(继承自 Visual3D)
CaptureMouse()

尝试将鼠标捕获到此元素。

CaptureStylus()

尝试强制捕获触笔到此元素。

CaptureTouch(TouchDevice)

尝试强制捕获此元素的触摸。

CheckAccess()

确定调用线程是否有权访问此 DispatcherObject权限。

(继承自 DispatcherObject)
ClearValue(DependencyProperty)

清除属性的本地值。 要清除的属性由 DependencyProperty 标识符指定。

(继承自 DependencyObject)
ClearValue(DependencyPropertyKey)

清除只读属性的本地值。 要清除的属性由一个 DependencyPropertyKey.

(继承自 DependencyObject)
CoerceValue(DependencyProperty)

强制指定依赖属性的值。 这是通过调用中调用依赖属性CoerceValueCallback的属性元数据中指定的任何DependencyObject函数来实现的。

(继承自 DependencyObject)
Equals(Object)

确定提供的 DependencyObject 是否等效于当前 DependencyObject。

(继承自 DependencyObject)
FindCommonVisualAncestor(DependencyObject)

返回视觉对象和另一个指定的视觉对象的公共上级。

(继承自 Visual3D)
Focus()

尝试对此元素设置逻辑焦点。

GetAnimationBaseValue(DependencyProperty)

检索指定 DependencyProperty 对象的基值。

(继承自 Visual3D)
GetHashCode()

获取此 DependencyObject代码的哈希代码。

(继承自 DependencyObject)
GetLocalValueEnumerator()

创建一个专用枚举器,用于确定哪些依赖项属性具有本地 DependencyObject设置的值。

(继承自 DependencyObject)
GetType()

获取当前实例的 Type。

(继承自 Object)
GetUIParentCore()

在派生类中重写时,如果不存在可视父级,则返回此元素的替代用户界面 (UI) 父级。

GetValue(DependencyProperty)

返回此实例 DependencyObject上的依赖属性的当前有效值。

(继承自 DependencyObject)
GetVisual3DChild(Int32)

返回 Visual3D 父 Visual3DCollection级中指定的值。

(继承自 Visual3D)
InvalidateModel()

使表示元素的模型失效。

InvalidateProperty(DependencyProperty)

重新评估指定依赖属性的有效值。

(继承自 DependencyObject)
IsAncestorOf(DependencyObject)

确定视觉对象是否为后代视觉对象的上级。

(继承自 Visual3D)
IsDescendantOf(DependencyObject)

确定视觉对象是否是上级视觉对象的后代。

(继承自 Visual3D)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
MoveFocus(TraversalRequest)

尝试将焦点从此元素移动到另一个元素。 移动焦点的方向由指导方向指定,该方向由此元素的视觉父级组织内解释。

OnAccessKey(AccessKeyEventArgs)

为调用此元素有意义的访问键时提供类处理。

OnCreateAutomationPeer()

返回 Windows Presentation Foundation (WPF) 基础结构的特定于 AutomationPeer 类的实现。

OnDragEnter(DragEventArgs)

当未经处理的 DragEnter 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnDragLeave(DragEventArgs)

当未经处理的 DragLeave 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnDragOver(DragEventArgs)

当未经处理的 DragOver 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnDrop(DragEventArgs)

当未经处理的 Drop 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnGiveFeedback(GiveFeedbackEventArgs)

当未经处理的 GiveFeedback 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnGotFocus(RoutedEventArgs)

GotFocus使用提供的事件数据引发路由事件。

OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)

当未经处理的 GotKeyboardFocus 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnGotMouseCapture(MouseEventArgs)

当未经处理的 GotMouseCapture 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnGotStylusCapture(StylusEventArgs)

当未经处理的 GotStylusCapture 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnGotTouchCapture(TouchEventArgs)

为捕获到此元素时发生的路由事件提供类处理 GotTouchCapture 。

OnIsKeyboardFocusedChanged(DependencyPropertyChangedEventArgs)

在此元素上引发未经处理的 IsKeyboardFocusedChanged 事件时调用。 实现此方法可为此事件添加类处理。

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

在此元素引发事件之前 IsKeyboardFocusWithinChanged 调用。 实现此方法可为此事件添加类处理。

OnIsMouseCapturedChanged(DependencyPropertyChangedEventArgs)

在此元素上引发未经处理的 IsMouseCapturedChanged 事件时调用。 实现此方法可为此事件添加类处理。

OnIsMouseCaptureWithinChanged(DependencyPropertyChangedEventArgs)

在此元素上引发未经处理的 IsMouseCaptureWithinChanged 事件时调用。 实现此方法可为此事件添加类处理。

OnIsMouseDirectlyOverChanged(DependencyPropertyChangedEventArgs)

在此元素上引发未经处理的 IsMouseDirectlyOverChanged 事件时调用。 实现此方法可为此事件添加类处理。

OnIsStylusCapturedChanged(DependencyPropertyChangedEventArgs)

在此元素上引发未经处理的 IsStylusCapturedChanged 事件时调用。 实现此方法可为此事件添加类处理。

OnIsStylusCaptureWithinChanged(DependencyPropertyChangedEventArgs)

在此元素上引发未经处理的 IsStylusCaptureWithinChanged 事件时调用。 实现此方法可为此事件添加类处理。

OnIsStylusDirectlyOverChanged(DependencyPropertyChangedEventArgs)

在此元素上引发未经处理的 IsStylusDirectlyOverChanged 事件时调用。 实现此方法可为此事件添加类处理。

OnKeyDown(KeyEventArgs)

当未经处理的 KeyDown 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnKeyUp(KeyEventArgs)

当未经处理的 KeyUp 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnLostFocus(RoutedEventArgs)

LostFocus使用提供的事件数据引发路由事件。

OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)

当未经处理的 LostKeyboardFocus 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnLostMouseCapture(MouseEventArgs)

当未经处理的 LostMouseCapture 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnLostStylusCapture(StylusEventArgs)

当未经处理的 LostStylusCapture 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnLostTouchCapture(TouchEventArgs)

为此元素丢失触摸捕获时发生的路由事件提供类处理 LostTouchCapture 。

OnMouseDown(MouseButtonEventArgs)

当未经处理的 MouseDown 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnMouseEnter(MouseEventArgs)

在此元素上引发未经处理的 MouseEnter 附加事件时调用。 实现此方法可为此事件添加类处理。

OnMouseLeave(MouseEventArgs)

在此元素上引发未经处理的 MouseLeave 附加事件时调用。 实现此方法可为此事件添加类处理。

OnMouseLeftButtonDown(MouseButtonEventArgs)

在此元素上引发未经处理的 MouseLeftButtonDown 路由事件时调用。 实现此方法可为此事件添加类处理。

OnMouseLeftButtonUp(MouseButtonEventArgs)

当未经处理的 MouseLeftButtonUp 路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnMouseMove(MouseEventArgs)

当未经处理的 MouseMove 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnMouseRightButtonDown(MouseButtonEventArgs)

当未经处理的 MouseRightButtonDown 路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnMouseRightButtonUp(MouseButtonEventArgs)

当未经处理的 MouseRightButtonUp 路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnMouseUp(MouseButtonEventArgs)

当未经处理的 MouseUp 路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnMouseWheel(MouseWheelEventArgs)

当未经处理的 MouseWheel 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewDragEnter(DragEventArgs)

当未经处理的 PreviewDragEnter 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewDragLeave(DragEventArgs)

当未经处理的 PreviewDragLeave 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewDragOver(DragEventArgs)

当未经处理的 PreviewDragOver 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewDrop(DragEventArgs)

当未经处理的 PreviewDrop 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewGiveFeedback(GiveFeedbackEventArgs)

当未经处理的 PreviewGiveFeedback 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs)

当未经处理的 PreviewGotKeyboardFocus 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewKeyDown(KeyEventArgs)

当未经处理的 PreviewKeyDown 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewKeyUp(KeyEventArgs)

当未经处理的 PreviewKeyUp 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewLostKeyboardFocus(KeyboardFocusChangedEventArgs)

当未经处理的 PreviewLostKeyboardFocus 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewMouseDown(MouseButtonEventArgs)

当未经处理的 PreviewMouseDown 附加路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)

当未经处理的 PreviewMouseLeftButtonDown 路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewMouseLeftButtonUp(MouseButtonEventArgs)

当未经处理的 PreviewMouseLeftButtonUp 路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewMouseMove(MouseEventArgs)

当未经处理的 PreviewMouseMove 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewMouseRightButtonDown(MouseButtonEventArgs)

当未经处理的 PreviewMouseRightButtonDown 路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewMouseRightButtonUp(MouseButtonEventArgs)

当未经处理的 PreviewMouseRightButtonUp 路由事件到达派生自此类的路由中的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewMouseUp(MouseButtonEventArgs)

当未经处理的 PreviewMouseUp 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewMouseWheel(MouseWheelEventArgs)

当未经处理的 PreviewMouseWheel 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewQueryContinueDrag(QueryContinueDragEventArgs)

当未经处理的 PreviewQueryContinueDrag 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusButtonDown(StylusButtonEventArgs)

当未经处理的 PreviewStylusButtonDown 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusButtonUp(StylusButtonEventArgs)

当未经处理的 PreviewStylusButtonUp 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusDown(StylusDownEventArgs)

当未经处理的 PreviewStylusDown 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusInAirMove(StylusEventArgs)

当未经处理的 PreviewStylusInAirMove 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusInRange(StylusEventArgs)

当未经处理的 PreviewStylusInRange 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusMove(StylusEventArgs)

当未经处理的 PreviewStylusMove 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusOutOfRange(StylusEventArgs)

当未经处理的 PreviewStylusOutOfRange 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusSystemGesture(StylusSystemGestureEventArgs)

当未经处理的 PreviewStylusSystemGesture 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewStylusUp(StylusEventArgs)

当未经处理的 PreviewStylusUp 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewTextInput(TextCompositionEventArgs)

当未经处理的 PreviewTextInput 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnPreviewTouchDown(TouchEventArgs)

为触摸按下此元素时发生的路由事件提供类处理 PreviewTouchDown 。

OnPreviewTouchMove(TouchEventArgs)

提供当触摸在此元素内部移动时发生的路由事件的类处理 PreviewTouchMove 。

OnPreviewTouchUp(TouchEventArgs)

为在此元素内释放触摸时发生的路由事件提供类处理 PreviewTouchUp 。

OnPropertyChanged(DependencyPropertyChangedEventArgs)

每当更新此 DependencyObject 属性上任何依赖属性的有效值时调用。 在事件数据中报告更改的特定依赖属性。

(继承自 DependencyObject)
OnQueryContinueDrag(QueryContinueDragEventArgs)

当未经处理的 QueryContinueDrag 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnQueryCursor(QueryCursorEventArgs)

当未经处理的 QueryCursor 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusButtonDown(StylusButtonEventArgs)

当未经处理的 StylusButtonDown 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusButtonUp(StylusButtonEventArgs)

当未经处理的 StylusButtonUp 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusDown(StylusDownEventArgs)

当未经处理的 StylusDown 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusEnter(StylusEventArgs)

当此元素引发未经处理的 StylusEnter 附加事件时调用。 实现此方法可为此事件添加类处理。

OnStylusInAirMove(StylusEventArgs)

当未经处理的 StylusInAirMove 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusInRange(StylusEventArgs)

当未经处理的 StylusInRange 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusLeave(StylusEventArgs)

当此元素引发未经处理的 StylusLeave 附加事件时调用。 实现此方法可为此事件添加类处理。

OnStylusMove(StylusEventArgs)

当未经处理的 StylusMove 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusOutOfRange(StylusEventArgs)

当未经处理的 StylusOutOfRange 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusSystemGesture(StylusSystemGestureEventArgs)

当未经处理的 StylusSystemGesture 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnStylusUp(StylusEventArgs)

当未经处理的 StylusUp 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnTextInput(TextCompositionEventArgs)

当未经处理的 TextInput 附加事件到达其路由中派生自此类的元素时调用。 实现此方法可为此事件添加类处理。

OnTouchDown(TouchEventArgs)

提供此元素内触摸按下时发生的路由事件的类处理 TouchDown 。

OnTouchEnter(TouchEventArgs)

提供当触摸从外部移动到此元素边界内时发生的路由事件的类处理 TouchEnter 。

OnTouchLeave(TouchEventArgs)

为当触摸从内到此元素边界外移动时发生的路由事件提供类处理 TouchLeave 。

OnTouchMove(TouchEventArgs)

提供当触摸在此元素内部移动时发生的路由事件的类处理 TouchMove 。

OnTouchUp(TouchEventArgs)

为在此元素内释放触摸时发生的路由事件提供类处理 TouchUp 。

OnUpdateModel()

在派生类中重写时参与呈现操作。

OnVisualChildrenChanged(DependencyObject, DependencyObject)

修改视觉对象时 Visual3DCollection 调用。

(继承自 Visual3D)
OnVisualParentChanged(DependencyObject)

当此 UIElement3D 元素的父元素报告对其基础视觉父项的更改时调用。

PredictFocus(FocusNavigationDirection)

在派生类中重写时,返回将接收指定焦点遍历方向的焦点的元素,而无需实际将焦点移动到该元素。

RaiseEvent(RoutedEventArgs)

引发特定的路由事件。 要 RoutedEvent 引发的标识在提供的实例中 RoutedEventArgs (作为 RoutedEvent 该事件数据的属性)。

ReadLocalValue(DependencyProperty)

返回依赖属性的本地值(如果存在)。

(继承自 DependencyObject)
ReleaseAllTouchCaptures()

从此元素释放所有捕获的触摸设备。

ReleaseMouseCapture()

释放鼠标捕获(如果此元素保存捕获)。

ReleaseStylusCapture()

如果此元素保存捕获,则释放触笔设备捕获。

ReleaseTouchCapture(TouchDevice)

尝试从此元素释放指定的触摸设备。

RemoveHandler(RoutedEvent, Delegate)

从此元素中删除指定的路由事件处理程序。

RemoveVisual3DChild(Visual3D)

删除两个三维视觉对象之间的父子关系。

(继承自 Visual3D)
SetCurrentValue(DependencyProperty, Object)

设置依赖项属性的值,而不更改其值源。

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

设置依赖属性的本地值,由依赖属性标识符指定。

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

设置只读依赖属性的本地值,由 DependencyPropertyKey 依赖属性的标识符指定。

(继承自 DependencyObject)
ShouldSerializeCommandBindings()

返回序列化进程是否应在此类实例上序列化属性的内容 CommandBindings 。

ShouldSerializeInputBindings()

返回序列化进程是否应在此类实例上序列化属性的内容 InputBindings 。

ShouldSerializeProperty(DependencyProperty)

返回一个值,该值指示序列化进程是否应序列化所提供的依赖属性的值。

(继承自 DependencyObject)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)
TransformToAncestor(Visual)

返回一个转换,该转换可用于将坐标从此 Visual3D 对象转换为对象的指定 Visual 上级。

(继承自 Visual3D)
TransformToAncestor(Visual3D)

返回一个转换,该转换可用于将坐标从此 Visual3D 对象转换为对象的指定 Visual3D 上级。

(继承自 Visual3D)
TransformToDescendant(Visual3D)

返回一个转换,该转换可用于将坐标从此 Visual3D 对象转换为指定的 Visual3D 下降对象。

(继承自 Visual3D)
VerifyAccess()

强制调用线程有权访问此 DispatcherObject权限。

(继承自 DispatcherObject)

事件

名称 说明
DragEnter

当输入系统将具有此元素的基础拖动事件报告为拖动目标时发生。

DragLeave

当输入系统报告具有此元素作为拖动原点的基础拖动事件时发生。

DragOver

当输入系统将具有此元素的基础拖动事件报告为潜在放置目标时发生。

Drop

当输入系统将此元素作为放置目标报告基础删除事件时发生。

FocusableChanged

当 Focusable 属性的值更改时发生。

GiveFeedback

当输入系统报告涉及此元素的基础拖放事件时发生。

GotFocus

当此元素获得逻辑焦点时发生。

GotKeyboardFocus

当键盘聚焦在此元素上时发生。

GotMouseCapture

当此元素捕获鼠标时发生。

GotStylusCapture

当此元素捕获触笔时发生。

GotTouchCapture

在捕获到此元素的触摸时发生。

IsEnabledChanged

当此元素上的 IsEnabled 属性值更改时发生。

IsHitTestVisibleChanged

当依赖属性的值 IsHitTestVisible 在此元素上更改时发生。

IsKeyboardFocusedChanged

当此属性的值 IsKeyboardFocused 在此元素上更改时发生。

IsKeyboardFocusWithinChanged

当此属性的值 IsKeyboardFocusWithin 在此元素上更改时发生。

IsMouseCapturedChanged

当此属性的值 IsMouseCaptured 在此元素上更改时发生。

IsMouseCaptureWithinChanged

当此属性的值 IsMouseCaptureWithin 在此元素上更改时发生。

IsMouseDirectlyOverChanged

当此属性的值 IsMouseDirectlyOver 在此元素上更改时发生。

IsStylusCapturedChanged

当此属性的值 IsStylusCaptured 在此元素上更改时发生。

IsStylusCaptureWithinChanged

当此属性的值 IsStylusCaptureWithin 在此元素上更改时发生。

IsStylusDirectlyOverChanged

当此属性的值 IsStylusDirectlyOver 在此元素上更改时发生。

IsVisibleChanged

当此属性的值 IsVisible 在此元素上更改时发生。

KeyDown

当键盘将焦点放在此元素上时按下键时发生。

KeyUp

当键盘焦点位于此元素上时释放键时发生。

LostFocus

当此元素失去逻辑焦点时发生。

LostKeyboardFocus

当键盘不再专注于此元素时发生。

LostMouseCapture

当此元素丢失鼠标捕获时发生。

LostStylusCapture

当此元素丢失触笔捕获时发生。

LostTouchCapture

当此元素丢失触摸捕获时发生。

MouseDown

当指针位于此元素上时按下任何鼠标按钮时发生。

MouseEnter

当鼠标指针进入此元素的边界时发生。

MouseLeave

当鼠标指针离开此元素的边界时发生。

MouseLeftButtonDown

当鼠标指针位于此元素上时按下鼠标左键时发生。

MouseLeftButtonUp

当鼠标指针位于此元素上时释放鼠标左键时发生。

MouseMove

当鼠标指针在此元素上移动时发生。

MouseRightButtonDown

当鼠标指针位于此元素上时按下鼠标右键时发生。

MouseRightButtonUp

当鼠标指针位于此元素上时释放鼠标右键时发生。

MouseUp

在此元素上释放任何鼠标按钮时发生。

MouseWheel

当用户在鼠标指针位于此元素上时旋转鼠标滚轮时发生。

PreviewDragEnter

当输入系统将具有此元素的基础拖动事件报告为拖动目标时发生。

PreviewDragLeave

当输入系统报告具有此元素作为拖动原点的基础拖动事件时发生。

PreviewDragOver

当输入系统将具有此元素的基础拖动事件报告为潜在放置目标时发生。

PreviewDrop

当输入系统将此元素作为放置目标报告基础删除事件时发生。

PreviewGiveFeedback

在启动拖放操作时发生。

PreviewGotKeyboardFocus

当键盘聚焦在此元素上时发生。

PreviewKeyDown

当键盘将焦点放在此元素上时按下键时发生。

PreviewKeyUp

当键盘焦点位于此元素上时释放键时发生。

PreviewLostKeyboardFocus

当键盘不再专注于此元素时发生。

PreviewMouseDown

当指针位于此元素上时按下任何鼠标按钮时发生。

PreviewMouseLeftButtonDown

当鼠标指针位于此元素上时按下鼠标左键时发生。

PreviewMouseLeftButtonUp

当鼠标指针位于此元素上时释放鼠标左键时发生。

PreviewMouseMove

当鼠标指针位于此元素上时鼠标指针移动时发生。

PreviewMouseRightButtonDown

当鼠标指针位于此元素上时按下鼠标右键时发生。

PreviewMouseRightButtonUp

当鼠标指针位于此元素上时释放鼠标右键时发生。

PreviewMouseUp

当鼠标指针位于此元素上时释放任何鼠标按钮时发生。

PreviewMouseWheel

当用户在鼠标指针位于此元素上时旋转鼠标滚轮时发生。

PreviewQueryContinueDrag

在拖放操作期间键盘或鼠标按钮状态发生更改时发生。

PreviewStylusButtonDown

当指针位于此元素上时按下触笔按钮时发生。

PreviewStylusButtonUp

当指针位于此元素上时释放触笔按钮时发生。

PreviewStylusDown

当触笔位于此元素上时触摸数字化器时发生。

PreviewStylusInAirMove

当触笔在元素上移动而不实际触摸数字化器时发生。

PreviewStylusInRange

当触笔足够接近数字化器以检测到时发生,同时在该元素上。

PreviewStylusMove

触笔在元素上移动时发生。 数字化器检测到触笔时必须移动以引发此事件,否则 PreviewStylusInAirMove 将引发此事件。

PreviewStylusOutOfRange

当触笔离数字化器太远而无法检测到时发生。

PreviewStylusSystemGesture

当用户执行多个触笔手势之一时发生。

PreviewStylusUp

当用户在触笔位于此元素上时将触笔从数字化器上引发触笔时发生。

PreviewTextInput

当此元素以独立于设备的方式获取文本时发生。

PreviewTouchDown

当手指触摸屏幕时手指位于此元素上时发生。

PreviewTouchMove

当手指位于此元素上时,手指在屏幕上移动时发生。

PreviewTouchUp

当手指位于此元素上时,手指从屏幕上抬起时发生。

QueryContinueDrag

在拖放操作期间键盘或鼠标按钮状态发生更改时发生。

QueryCursor

当请求显示游标时发生。 每次鼠标指针移动到新位置时,都会对元素引发此事件,这意味着光标对象可能需要根据其新位置进行更改。

StylusButtonDown

当指针位于此元素上时按下触笔按钮时发生。

StylusButtonUp

当指针位于此元素上时释放触笔按钮时发生。

StylusDown

触笔触摸数字化器时,触笔位于此元素上时发生。

StylusEnter

当触笔进入此元素的边界时发生。

StylusInAirMove

当触笔在元素上移动而不实际触摸数字化器时发生。

StylusInRange

当触笔足够接近数字化器以检测到时发生,同时在该元素上。

StylusLeave

当触笔离开元素的边界时发生。

StylusMove

当触笔移到此元素上时发生。 触笔必须在数字化器上移动才能引发此事件。 否则, StylusInAirMove 将改为引发。

StylusOutOfRange

当触笔离数字化器太远而无法检测到时发生,同时在该元素上。

StylusSystemGesture

当用户执行多个触笔手势之一时发生。

StylusUp

当用户在此元素上时将触笔从数字化器上引发触笔时发生。

TextInput

当此元素以独立于设备的方式获取文本时发生。

TouchDown

当手指触摸屏幕时手指位于此元素上时发生。

TouchEnter

当触摸从外部移动到此元素的边界内时发生。

TouchLeave

当触摸从内到此元素边界外移动时发生。

TouchMove

当手指位于此元素上时,手指在屏幕上移动时发生。

TouchUp

当手指位于此元素上时,手指从屏幕上抬起时发生。

适用于