Search Results for

    Show / Hide Table of Contents

    Class Bevel

    Represents a bevel effect applied to an object or text in a Word document.

    Inheritance
    System.Object
    Bevel
    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public class Bevel : Object

    Giving a shape's edge a raised, three-dimensional profile in a Word document runs through Bevel. It describes the chamfer applied along the top or bottom edge of a shape, the formatting that makes a button or callout look embossed rather than flat. A developer styling shapes for a polished document reaches for it when a plain outline is not enough and the edge should catch light.

    A bevel attaches to a shape's 3D formatting, so it is configured as part of building that shape rather than on its own. Set the profile and the depth once, and the edge renders with that effect wherever the shape appears.

    PresetProfileType chooses the bevel shape from the BevelPresetTypeValues options, picking the geometry of the raised edge from profiles such as Circle, Angle, Convex, and SoftRound. Height and Width set the depth of the effect, and because measurements in Word can be expressed in several units, the SetHeight and SetWidth methods take both a value and a MeasurementUnit so the depth is unambiguous. GetHeight and GetWidth read those values back in a chosen MeasurementUnit, which is convenient when the value was set in one unit and you need it in another.

    Prefer the SetHeight and SetWidth methods over assigning the raw Height and Width properties whenever the unit matters, since the methods record the value with its unit rather than a bare number. A MeasurementUnit of Point suits fine edge depths, while Millimeter or Inch reads more naturally for larger shapes. Keep the height and width modest relative to the shape; an oversized bevel can overwhelm the shape's face. Build the bevel up first, then attach it to the shape's 3D formatting as part of styling that shape.

    using IronWord.Models;
    using IronWord.Models.Enums;
    
    var bevel = new Bevel();
    bevel.PresetProfileType = BevelPresetTypeValues.Circle;
    bevel.SetHeight(5, MeasurementUnit.Point);
    bevel.SetWidth(5, MeasurementUnit.Point);

    The glow text effect how-to, the shadow text effect how-to, and the text outline effect how-to show related shape and text effects in context.

    Constructors

    Bevel()

    Declaration
    public Bevel()

    Properties

    Height

    Gets or sets the height of the bevel effect.

    Declaration
    public double Height { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The height is specified in points (1/72 inch).

    PresetProfileType

    Gets or sets the PresetProfileType of the bevel effect.

    Declaration
    public BevelPresetTypeValues PresetProfileType { get; set; }
    Property Value
    Type Description
    BevelPresetTypeValues

    Width

    Gets or sets the width of the bevel effect.

    Declaration
    public double Width { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The width is specified in points (1/72 inch).

    Methods

    GetHeight(MeasurementUnit)

    Gets the height of the bevel effect in the specified measurement unit.

    Declaration
    public double GetHeight(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert the height to.

    Returns
    Type Description
    System.Double

    The height of the bevel effect.

    GetWidth(MeasurementUnit)

    Gets the width of the bevel effect in the specified measurement unit.

    Declaration
    public double GetWidth(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert the width to.

    Returns
    Type Description
    System.Double

    The width of the bevel effect.

    SetHeight(Double, MeasurementUnit)

    Sets the height of the bevel effect to the specified value in the specified measurement unit.

    Declaration
    public void SetHeight(double height, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double height

    The height of the bevel effect.

    MeasurementUnit measurementUnit

    The measurement unit of the specified height.

    SetWidth(Double, MeasurementUnit)

    Sets the width of the bevel effect to the specified value in the specified measurement unit.

    Declaration
    public void SetWidth(double width, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double width

    The width of the bevel effect.

    MeasurementUnit measurementUnit

    The measurement unit of the specified width.

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    IronWord_for_dotnet_log2o
    Blue key in circleGet started for FREE
    No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet started for FREE
    The trial form was submitted successfully.
    Calendar in circleBook Free Live Demo
    No contact, no card details, no commitments Book a 30-minute, personal demo.
    Here's what to expect:

    A live demo of our product and its key features

    Get project specific feature recommendations

    All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation
    Support Team Member 6 related to The C# PDF Library Support Team Member 14 related to The C# PDF Library Support Team Member 4 related to The C# PDF Library Support Team Member 2 related to The C# PDF Library
    Online 24/5
    Need help? Our sales team would be glad to help you.
    Try the Enterprise Trial
    ironpdf_for_dotnet_log2o
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    bullet_checkedNo credit card or account creation required
    Key in blue circle
    Get your free 30-day Trial Key instantly.
    Blue key in circleNo credit card or account creation required
    Green Check in orange circle
    The trial form was submitted successfully.
    badge_greencheck_in_yellowcircle
    Thank you for starting a trial

    Please check your email for the trial license key.

    If you don’t receive an email, please start a live chat or email support@ironsoftware.com

    Install with NuGet
    View Licensing
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronWord