当前位置: 首页>>代码示例>>C#>>正文


C# Rect构造函数代码示例

本文整理汇总了C#中System.Windows.Rect.Rect构造函数的典型用法代码示例。如果您正苦于以下问题:C# Rect构造函数的具体用法?C# Rect怎么用?C# Rect使用的例子?那么恭喜您, 这里精选的构造函数代码示例或许可以为您提供帮助。您也可以进一步了解该构造函数所在System.Windows.Rect的用法示例。


在下文中一共展示了Rect构造函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: createRectExample2

private Rect createRectExample2()
{
    // This constructor initializes a new instance of the Rect structure that 
    // is of the specified size and is located at (0,0). 
    Rect myRectangle = new Rect(new Size(200, 50));

    // Returns a rectangle with a width of 200, a height of 50 and a position
    // of 0,0.
    return myRectangle;
}
开发者ID:.NET开发者,项目名称:System.Windows,代码行数:10,代码来源:Rect

示例2: createRectExample3

private Rect createRectExample3()
{
    // This constructor intializes a new instance of the Rect structure that is 
    // exactly large enough to contain the two specified points.  
    Rect myRectangle = new Rect(new Point(15, 30), new Point(50,70));

    // Returns a rectangle with a position of 15,30, a width of 35 and height of 40.
    return myRectangle;
}
开发者ID:.NET开发者,项目名称:System.Windows,代码行数:9,代码来源:Rect

示例3: createRectExample4

private Rect createRectExample4()
{
    // This constructor initializes a new instance of the Rect structure that has the 
    // specified top-left corner location and the specified width and height (Size).    
    Rect myRectangle = new Rect(new Point(15, 30), new Size(35, 40));

    // Returns a rectangle with a position of 15,30, a width of 35 and height of 40.
    return myRectangle;
}
开发者ID:.NET开发者,项目名称:System.Windows,代码行数:9,代码来源:Rect

示例4: createRectExample5

private Rect createRectExample5()
{
    // This constructor Intializes a new instance of the Rect structure that is exactly 
    // large enough to contain the specified point and the sum of the specified point 
    // and the specified vector.   
    Rect myRectangle = new Rect(new Point(15, 30), new Vector(35, 40));

    // Returns a rectangle with a position of 15,30, a width of 35 and height of 40.
    return myRectangle;
}
开发者ID:.NET开发者,项目名称:System.Windows,代码行数:10,代码来源:Rect

示例5: createRectExample6

private Rect createRectExample6()
{
    // This constructor intializes a new instance of the Rect structure with the specified 
    // x- and y-coordinates and the specified width and height. 
    Rect myRectangle = new Rect(15, 30, 35, 40);

    // Returns a rectangle with a position of 15,30, a width of 35 and height of 40.
    return myRectangle;
}
开发者ID:.NET开发者,项目名称:System.Windows,代码行数:9,代码来源:Rect


注:本文中的System.Windows.Rect.Rect构造函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。