vb System.Windows.Forms.Design.Behavior.BehaviorService.ControlToAdornerWindow类(方法)实例源码

下面列出了vb System.Windows.Forms.Design.Behavior.BehaviorService.ControlToAdornerWindow 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.Windows.Forms.Design.Behavio   
Public Overrides ReadOnly Property Bounds() As Rectangle
    Get
        ' Create a glyph that is 10x10 and sitting
        ' in the middle of the control.  Glyph coordinates
        ' are in adorner window coordinates, so we must map
        ' using the behavior service.
        Dim edge As Point = behaviorSvc.ControlToAdornerWindow(control)
        Dim size As Size = control.Size
        Dim center As New Point(edge.X + size.Width / 2, edge.Y + _
            size.Height / 2)

        Dim bounds1 As New Rectangle(center.X - 5, center.Y - 5, 10, 10)

        Return bounds1
    End Get
End Property


问题


面经


文章

微信
公众号

扫码关注公众号