skip navigation
  • 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 Tools
    ThemeBuilder
    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 SizeU

Stores an ordered pair of Unit-based numbers, typically the width and height of a rectangle.

Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Telerik.Reporting.Drawing
Assembly: Telerik.Reporting.dll

Syntax

public struct SizeU

Constructors

SizeU(Size)

Initializes a new instance of the SizeU class from the specified existing Size in device-independent pixels.

Declaration
public SizeU(Size sizeDips)
Parameters
System.Drawing.Size sizeDips

The System.Drawing.Size from which to create the new SizeU.

SizeU(SizeF)

Initializes a new instance of the SizeU class from the specified existing SizeF in device-independent pixels.

Declaration
public SizeU(SizeF sizeDips)
Parameters
System.Drawing.SizeF sizeDips

The System.Drawing.SizeF from which to create the new SizeU.

SizeU(Unit, Unit)

Initializes a new instance of the SizeU class from the specified dimensions.

Declaration
public SizeU(Unit width, Unit height)
Parameters
Unit width

The width component of the new SizeU.

Unit height

The height component of the new SizeU.

Fields

Empty

Initializes a new instance of the SizeU class.

Declaration
public static readonly SizeU Empty
Field Value
SizeU

Properties

Height

Gets or sets the vertical component of this SizeU.

Declaration
public Unit Height { get; set; }
Property Value
Unit

The vertical component of this SizeU.

IsEmpty

Gets a value indicating whether this SizeU has zero width and height.

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

This property returns true when this SizeU has both a width and height of zero; otherwise, false.

Width

Gets or sets the horizontal component of this SizeU.

Declaration
public Unit Width { get; set; }
Property Value
Unit

The horizontal component of this SizeU.

Methods

Equals(Object)

Tests to see whether the specified object is a SizeU with the same dimensions as this SizeU.

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

The System.Object to test.

Returns
System.Boolean

This method returns true if obj is a SizeU and has the same width and height as this SizeU; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Returns a hash code for this SizeU structure.

Declaration
public override int GetHashCode()
Returns
System.Int32

An integer value that specifies a hash value for this SizeU structure.

Overrides
System.ValueType.GetHashCode()

ToString()

Creates a human-readable string that represents this SizeU.

Declaration
public override string ToString()
Returns
System.String

A string that represents this SizeU.

Overrides
System.ValueType.ToString()

ToString(CultureInfo)

Creates a human-readable string that represents this SizeU.

Declaration
public string ToString(CultureInfo culture)
Parameters
System.Globalization.CultureInfo culture

A System.Globalization.CultureInfo object according to which to format the string.

Returns
System.String

A string that represents this SizeU.

Operators

Addition(SizeU, SizeU)

Adds the width and height of one SizeU structure to the width and height of another SizeU structure.

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

The first SizeU to add.

SizeU size2

The second SizeU to add.

Returns
SizeU

A SizeU structure that is the result of the addition operation.

Division(SizeU, Double)

Devides a SizeU by a specified value.

Declaration
public static SizeU operator /(SizeU size, double value)
Parameters
SizeU size

The SizeU to divide (scale).

System.Double value

A double value to divide by.

Returns
SizeU

A SizeU that is the quotient of size and value.

Equality(SizeU, SizeU)

Tests whether two SizeU structures are equal.

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

The SizeU structure on the left side of the equality operator.

SizeU size2

The SizeU structure on the right side of the equality operator.

Returns
System.Boolean

This operator returns true if size1 and size2 have equal width and height; otherwise, false.

Explicit(SizeU to Size)

Converts the specified SizeU to a System.Drawing.Size in device-dependent pixels.

Declaration
public static explicit operator Size(SizeU size)
Parameters
SizeU size

The SizeU structure to be converted.

Returns
System.Drawing.Size

The System.Drawing.Size structure to which this operator converts.

Explicit(SizeU to SizeF)

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

Returns
System.Drawing.SizeF

Inequality(SizeU, SizeU)

Tests whether two SizeU structures are different.

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

The SizeU structure on the left side of the equality operator.

SizeU size2

The SizeU structure on the right side of the equality operator.

Returns
System.Boolean

This operator returns true if size1 and size2 differ either in width or height; false if size1 and size2 are equal.

Multiply(SizeU, Double)

Multiplies a SizeU by a specified value.

Declaration
public static SizeU operator *(SizeU size, double value)
Parameters
SizeU size

The SizeU to multiply.

System.Double value

A double value to multiply by.

Returns
SizeU

A SizeU that is the product of size and value.

Subtraction(SizeU, SizeU)

Subtracts the width and height of one SizeU structure from the width and height of another SizeU structure.

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

The SizeU on the left side of the subtraction operator.

SizeU size2

The SizeU on the right side of the subtraction operator.

Returns
SizeU

A SizeU structure that is the result of the subtraction operation.

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Online Demos
Support Resources
  • Documentation
  • Knowledge Base
  • Videos
  • Reporting Samples Repository
  • Reporting Release History
Community
  • Forums
  • Blogs
  • Reporting 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.