Glyph.Bounds プロパティとは? わかりやすく解説

Glyph.Bounds プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

Glyph範囲取得します

名前空間: System.Windows.Forms.Design.Behavior
アセンブリ: System.Design (system.design.dll 内)
構文構文

使用例使用例

Boundsオーバーライドして固有の位置固有の大きさグリフ作成する方法次の例に示します。このコード例は、BehaviorService クラストピック取り上げているコード例一部分です。

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
public override Rectangle Bounds
{
    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.
        Point edge = behaviorSvc.ControlToAdornerWindow(control);
        Size size = control.Size;
        Point center = new Point(edge.X + (size.Width / 2), 
            edge.Y + (size.Height / 2));

        Rectangle bounds = new Rectangle(
            center.X - 5,
            center.Y - 5,
            10,
            10);

        return bounds;
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Glyph.Bounds プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Glyph.Bounds プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS