• Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Struct SizeF

Represents a dimension in 2D coordinate space

Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Documents.dll

Syntax

public struct SizeF

Constructors

SizeF(Single, Single)

Initializes a new instance of the SizeF struct.

Declaration
public SizeF(float width, float height)
Parameters
System.Single width

The width.

System.Single height

The height.

SizeF(Size)

Initializes a new instance of the SizeF struct.

Declaration
public SizeF(Size size)
Parameters
System.Windows.Size size

The size.

SizeF(PointF)

Initializes a new instance of the SizeF struct.

Declaration
public SizeF(PointF point)
Parameters
PointF point

The point.

SizeF(SizeF)

Initializes a new instance of the SizeF struct.

Declaration
public SizeF(SizeF size)
Parameters
SizeF size

The size.

Fields

Empty

An empty instance.

Declaration
public static readonly SizeF Empty
Field Value
SizeF

Properties

Height

Gets or sets the height.

Declaration
public float Height { get; set; }
Property Value
System.Single

The height.

IsEmpty

Gets a value indicating whether this instance is empty.

Declaration
public bool IsEmpty { get; }
Property Value
System.Boolean

true if this instance is empty; otherwise, false.

Width

Gets or sets the width.

Declaration
public float Width { get; set; }
Property Value
System.Single

The width.

Methods

Add(SizeF, SizeF)

Adds the specified size.

Declaration
public static SizeF Add(SizeF size1, SizeF size2)
Parameters
SizeF size1

The first size.

SizeF size2

The second size.

Returns
SizeF

Equals(Object)

Determines whether the specified System.Object, is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
System.Object obj

The System.Object to compare with this instance.

Returns
System.Boolean

true if the specified System.Object is equal to this instance; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
System.ValueType.GetHashCode()

Subtract(SizeF, SizeF)

Subtracts the specified size.

Declaration
public static SizeF Subtract(SizeF size1, SizeF size2)
Parameters
SizeF size1

The first size.

SizeF size2

The second size.

Returns
SizeF

The result of the substraction.

ToPointF()

Converts to PointF.

Declaration
public PointF ToPointF()
Returns
PointF

The PointF object.

ToSize()

Converts to System.Windows.Size.

Declaration
public Size ToSize()
Returns
System.Windows.Size

The System.Windows.Size object.

ToString()

Converts to string.

Declaration
public override string ToString()
Returns
System.String

A System.String that represents this instance.

Overrides
System.ValueType.ToString()

Operators

Addition(SizeF, SizeF)

Implements the operator +.

Declaration
public static SizeF operator +(SizeF size1, SizeF size2)
Parameters
SizeF size1

The first size.

SizeF size2

The second size.

Returns
SizeF

The result of the operator.

Equality(SizeF, SizeF)

Implements the operator ==.

Declaration
public static bool operator ==(SizeF size1, SizeF size2)
Parameters
SizeF size1

The first size.

SizeF size2

The second size.

Returns
System.Boolean

The result of the operator.

Explicit(SizeF to PointF)

Performs an explicit conversion from SizeF to PointF.

Declaration
public static explicit operator PointF(SizeF size)
Parameters
SizeF size

The size.

Returns
PointF

The result of the conversion.

Inequality(SizeF, SizeF)

Implements the operator !=.

Declaration
public static bool operator !=(SizeF size1, SizeF size2)
Parameters
SizeF size1

The first size.

SizeF size2

The second size.

Returns
System.Boolean

The result of the operator.

Subtraction(SizeF, SizeF)

Implements the operator -.

Declaration
public static SizeF operator -(SizeF size1, SizeF size2)
Parameters
SizeF size1

The first size.

SizeF size2

The second size.

Returns
SizeF

The result of the operator.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.