zoukankan      html  css  js  c++  java
  • Visual对象——WPF


    System.Object
            System.Windows.Threading.DispatcherObject
                    System.Windows.DependencyObject
                            System.Windows.Media.Visual
                                    System.Windows.Media.ContainerVisual
                                    System.Windows.UIElement
                                            System.Windows.FrameworkElement
                                    System.Windows.Media.Media3D.Viewport3DVisual

    Visual:是WPF中用以呈现点击测试(与一个点、矩形、区域或其它对象之间执行像素级的点击检测,比如判断鼠标是否在一个对象内等),坐标转换和计算可视化对象尺寸范围的类。

    以下是Visual,UIElement,FrameworkElement的构造示意:
    public abstract class Visual : DependencyObject
    public class UIElement : Visual, IAnimatable, IInputElement
    public class FrameworkElement : UIElement, IFrameworkInputElement, IInputElement, ISupportInitialize

    从Visual的构造看,它是继承于DependencyObject的抽像类。
    而UIElement继承自Visual,FrameworkElement又继承自UIElement。

    Visual是所有FrameworkElement的抽象基类。它为在WPF中写新的控件提供了入口点,在许多方面,你可以把它想像成为相当于Win32应用程序模式下的window句柄(HWND)。
    Visual对象是WPF的核心对象,其主要角色是提供呈现支持(即为所有“FrameworkElement、UIElement”  提供 视觉呈现);用户控件,如按钮Button和文本框TextBox,都从Visual类继承,并使用Visual定义的属性来维持它们的呈现数据。

  • 相关阅读:
    使用libgdx及其中的box2d 2.1的注意事项
    Android.mk file syntax specification(ndkr8)
    NDK Note
    Problems of Android NDK
    Android.mk of NDK
    Android IM Note
    Regular Expression
    Some Efficient Algorithms
    libgdx use TexturePacker
    The Conversion Of JNI
  • 原文地址:https://www.cnblogs.com/changbaishan/p/4041569.html
Copyright © 2011-2022 走看看