本文整理汇总了VB.NET中System.Windows.Forms.Design.Behavior.Glyph.Bounds属性的典型用法代码示例。如果您正苦于以下问题:VB.NET Glyph.Bounds属性的具体用法?VB.NET Glyph.Bounds怎么用?VB.NET Glyph.Bounds使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Windows.Forms.Design.Behavior.Glyph
的用法示例。
在下文中一共展示了Glyph.Bounds属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Bounds
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